Nuclide
Software Development Kit for id Technology
|
Server-Entity: Interactive Moving Train.
QUAKED func_tracktrain (0 .5 .8) ? NOPITCH NOUSER NOTSOLID
An interactive train that moves along a series of path_track entities. It turns and can respond to user input. It does not necessarily have to.
Upon level entry, the func_tracktrain will spawn right where its first path_track node is, as specified in target
.
This is so you can light the func_tracktrain somewhere else - like a lonely box somewhere outside the playable area.
If no targetname is specified, the train will move on its own at map-launch.
By default, any func_tracktrain can be interacted with by players. You can restrict the area in which the train can be used with a func_traincontrols entity. You can also set the NOUSER (2) spawnflag to disable it entirely.
This entity was introduced in Half-Life (1998).
Public Member Functions | |
void | func_tracktrain (void) |
virtual void | PredictPreFrame (void) |
virtual void | PredictPostFrame (void) |
virtual void | ReceiveEntity (float, float) |
Client: Handles network updates from the server for the associated entity. More... | |
virtual void | UpdateView (void) |
nonvirtual void | PathMoveForward (void) |
Call to move the tracktrain forward. More... | |
nonvirtual void | PathMoveBack (void) |
Call to move the tracktrain backward. More... | |
nonvirtual void | PathClear (void) |
Called when the current path is cleared, and a stop sound is played. More... | |
nonvirtual void | PathDone (void) |
Called when the current path is cleared, and a stop sound is played. More... | |
nonvirtual bool | IgnoresPitch (void) |
Returns if the train can pitch up/down. More... | |
nonvirtual path_track | GetTrackNodeForward (void) |
Returns the track node (path_track) ahead of the train. More... | |
nonvirtual path_track | GetTrackNodeBack (void) |
Returns the track node (path_track) back of the train. More... | |
nonvirtual vector | GetPointBetweenNodes (float) |
Returns a 3d position between two nodes at the specified progression. More... | |
nonvirtual vector | GetTrainPivotPoint (bool) |
nonvirtual void | RenderDebugInfo (void) |
nonvirtual bool | ControlCheck (entity) |
virtual void | Blocked (entity) |
Called whenever out movement is being blocked by an entity. More... | |
virtual void | OnPlayerUse (void) |
virtual void | Save (float) |
Handles saving a copy of this entity to a given filehandle. More... | |
virtual void | Restore (string, string) |
Similar to NSIO::SpawnKey but for save-game fields. More... | |
virtual void | TransitionComplete (void) |
Called when the entity has successfully completed a level transition. More... | |
virtual void | SpawnKey (string, string) |
This method handles entity key/value pairs on map load. More... | |
virtual void | Spawned (void) |
Called when the entity is fulled initialized. More... | |
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. More... | |
virtual void | Trigger (entity, triggermode_t) |
Called whenever we're legacy triggered by another object or function. More... | |
virtual void | Input (entity, string, string) |
Called when we are being prompted by another object/function with an input message. More... | |
virtual void | EvaluateEntity (void) |
Run each tic after physics are run to determine if we need to send updates over the network. More... | |
virtual float | SendEntity (entity, float) |
Called by the engine whenever we need to send a client an update about this entity. More... | |
virtual void | PlayerInput (void) |
void func_tracktrain::func_tracktrain | ( | void | ) |
|
virtual |
Called whenever out movement is being blocked by an entity.
This is currently only relevant on entities that are of MOVETYPE_PUSH
.
Reimplemented from NSTrigger.
bool func_tracktrain::ControlCheck | ( | entity | toCheck | ) |
|
virtual |
Run each tic after physics are run to determine if we need to send updates over the network.
Reimplemented from NSVehicle.
vector func_tracktrain::GetPointBetweenNodes | ( | float | percentageValue | ) |
Returns a 3d position between two nodes at the specified progression.
Value between 0.0f - 1.0f, 1.0 being closest to the next node heading forward.
path_track func_tracktrain::GetTrackNodeBack | ( | void | ) |
Returns the track node (path_track) back of the train.
path_track func_tracktrain::GetTrackNodeForward | ( | void | ) |
Returns the track node (path_track) ahead of the train.
vector func_tracktrain::GetTrainPivotPoint | ( | bool | drivingBackwards | ) |
bool func_tracktrain::IgnoresPitch | ( | void | ) |
Returns if the train can pitch up/down.
|
virtual |
Called when we are being prompted by another object/function with an input message.
Reimplemented from NSSurfacePropEntity.
|
virtual |
void func_tracktrain::PathClear | ( | void | ) |
Called when the current path is cleared, and a stop sound is played.
void func_tracktrain::PathDone | ( | void | ) |
Called when the current path is cleared, and a stop sound is played.
void func_tracktrain::PathMoveBack | ( | void | ) |
Call to move the tracktrain backward.
void func_tracktrain::PathMoveForward | ( | void | ) |
Call to move the tracktrain forward.
|
virtual |
Reimplemented from NSVehicle.
|
virtual |
Reimplemented from NSVehicle.
|
virtual |
Reimplemented from NSVehicle.
|
virtual |
Client: Handles network updates from the server for the associated entity.
Reimplemented from NSVehicle.
void func_tracktrain::RenderDebugInfo | ( | void | ) |
|
virtual |
Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state.
Reimplemented from NSSurfacePropEntity.
|
virtual |
Similar to NSIO::SpawnKey
but for save-game fields.
Whatever you write into file handles within your NSIO::Save()
method needs to be read back in here.
Reimplemented from NSVehicle.
|
virtual |
Handles saving a copy of this entity to a given filehandle.
Within you want to use the NSIO::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.
Reimplemented from NSVehicle.
|
virtual |
Called by the engine whenever we need to send a client an update about this entity.
Reimplemented from NSVehicle.
|
virtual |
Called when the entity is fulled initialized.
Any spawn key/value info pairs have already been dealt with. So now we can make full decisions on the entity. Always make sure to call super::Spawned();
inside your method when overriding.
Reimplemented from NSSurfacePropEntity.
|
virtual |
This method handles entity key/value pairs on map load.
You can easily convert the strValue
parameter using the ReadFloat etc. methods that are part of NSIO.
Reimplemented from NSSurfacePropEntity.
|
virtual |
Called when the entity has successfully completed a level transition.
Reimplemented from NSIO.
|
virtual |
Called whenever we're legacy triggered by another object or function.
Reimplemented from NSTrigger.
|
virtual |
Reimplemented from NSVehicle.