Shared-Entity: Brush Vehicle.
QUAKED func_vehicle (0 .5 .8) ? FUNCVEH_NOPITCH FUNCVEH_NOUSER x FUNCVEH_PASSABLE FUNCVEH_FWDRIVE FUNCVEH_RWDRIVE
OVERVIEW
Primitive brush-based vehicle entity.
KEYS
- "targetname" : Name
- "target" : Name of the first path_track/corner (See Notes)
- "acceleration" : Acceleration multiplier
- "speed" : Top-speed of the vehicle in q-units per second
- "height" : Wheel-height in units
- "width" : Width of the vehicle, used to calculate the wheels
- "length" : Length of the vehicle, used to calculate the wheels
- "bouncefactor" : Multiplier for the bouncyness of the vehicle
- "skidspeed" : At which speed the vehicle starts skidding
- "traction" : Multiplier for the traction affecting the vehicle
- "breakfactor" : Multiplier for the breaking mechanics
- "steerfactor" : Multiplier for the steering speed
- "straightenfactor" : Multiplier for affecting the straightening mechanism
- "gravitydir" : Normalized vector setting the direction of gravity
Unimplemented:
- "sounds" : A sound-set to use
- "volume" : Volume at which said sounds play at (from 0-10)
- "dmg" : Damage inflicted upon entities when blocked
SPAWNFLAGS
- FUNCVEH_NOPITCH (1) : Don't adjust the pitch angle of the vehicle, only point forward.
- FUNCVEH_NOUSER (2) : Don't allow pressing "use" key/button to control it.
- FUNCVEH_PASSABLE (4) : Don't do collision testing against this entity.
- FUNCVEH_FWDRIVE (8) : Front wheel drive mode.
- FUNCVEH_RWDRIVE (16) : Rear wheel drive mode.
NOTES
The vehicle's position is set via the 'target' key, which sets the first path_track/corner. The vehicle is then teleported to the 'target' but it stays at the same vertical position as originally placed.
The angle is calculated by aiming the 'target' path_track/corner entity to its own 'target' entity. So yes, you need two of these path_track/corner entities.
TRIVIA
This entity was introduced in Counter-Strike (2000).
|
void | func_vehicle (void) |
|
virtual void | Spawned (void) |
| Called when the entity is fulled initialized.
|
|
virtual void | Physics (void) |
|
virtual void | RunVehiclePhysics (void) |
|
virtual void | PlayerInput (void) |
|
virtual void | OnRemoveEntity (void) |
| Handles what happens before the entity gets removed from the client game.
|
|
virtual void | PredictPreFrame (void) |
|
virtual void | PredictPostFrame (void) |
|
virtual void | ReceiveEntity (float, float) |
| Client: Handles network updates from the server for the associated entity.
|
|
virtual void | UpdateView (void) |
|
virtual void | Save (float) |
| Handles saving a copy of this entity to a given filehandle.
|
|
virtual void | Restore (string, string) |
| Similar to ncIO::SpawnKey() but for save-game fields.
|
|
virtual void | SpawnKey (string, string) |
| This method handles entity key/value pairs on map load.
|
|
virtual void | Respawn (void) |
| Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state.
|
|
virtual void | Realign (void) |
|
virtual void | OnPlayerUse (void) |
|
virtual void | EvaluateEntity (void) |
| Run each tic after physics are run to determine if we need to send updates over the network.
|
|
virtual float | SendEntity (entity, float) |
| Called by the engine whenever we need to send a client an update about this entity.
|
|