Nuclide
Software Development Kit for id Technology (BETA)
|
ncMoverEntity is responsible for handling movement functions of mainly brush-based entities that move and push other entities around the game world.
Your sub-class will define the type of movement and the two positions within the entity will traverse - and then do so at your request.
Public Member Functions | |
void | ncMoverEntity (void) |
nonvirtual vector | GetDirectionalPosition (vector, float) |
Returns a directional position from the current one. More... | |
nonvirtual vector | GetDirectionalRotation (vector, float) |
Returns a directional angle from the current one. More... | |
nonvirtual void | SetMoverState (moverState_t) |
Set the movement state. More... | |
nonvirtual moverState_t | GetMoverState (void) |
Returns the movement state. More... | |
nonvirtual void | SetMoverType (moverType_t) |
Set the movement type. More... | |
nonvirtual moverType_t | GetMoverType (void) |
Returns the movement type. More... | |
nonvirtual void | SetMoverPosition1 (vector) |
Sets the initial starting position. More... | |
nonvirtual vector | GetMoverPosition1 (void) |
Returns the starting position. More... | |
nonvirtual void | SetMoverPosition2 (vector) |
Sets the final destination. More... | |
nonvirtual vector | GetMoverPosition2 (void) |
Returns the final destination. More... | |
nonvirtual void | SetMoverRotation1 (vector) |
Sets the initial starting angle. More... | |
nonvirtual vector | GetMoverRotation1 (void) |
Returns the starting angle. More... | |
nonvirtual void | SetMoverRotation2 (vector) |
Sets the final destination angle. More... | |
nonvirtual vector | GetMoverRotation2 (void) |
Returns the final destination angle. More... | |
nonvirtual void | MoveToPosition (vector, float) |
Moves this entity to the specified position. More... | |
nonvirtual void | RotateToPosition (vector, float) |
Rotates this entity to the desired angle. More... | |
nonvirtual void | MoveAndRotateToPosition (vector, vector, float) |
Moves and rotates this entity to a desired location. More... | |
nonvirtual void | MoveToReverse (float) |
Moves to the reverse state. More... | |
nonvirtual void | RotateToReverse (float) |
Rotates to the reversed state. More... | |
nonvirtual bool | IsMoving (void) |
Returns if the ncMoverEntity is currently moving. More... | |
virtual void | MoverStartsMoving (void) |
Overridable: Called when the mover starts moving from its position to another. More... | |
virtual void | MoverFinishesMoving (void) |
Overridable: Called when the mover completes its movement to a destination. More... | |
virtual void | Save (float) |
Handles saving a copy of this entity to a given filehandle. More... | |
virtual void | Restore (string, string) |
Similar to ncIO::SpawnKey() but for save-game fields. More... | |
virtual void | SpawnKey (string, string) |
This method handles entity key/value pairs on map load. More... | |
void ncMoverEntity::ncMoverEntity | ( | void | ) |
vector ncMoverEntity::GetDirectionalPosition | ( | vector | vecAngle, |
float | flLip | ||
) |
Returns a directional position from the current one.
vector ncMoverEntity::GetDirectionalRotation | ( | vector | normalizedAngle, |
float | travelDistance | ||
) |
Returns a directional angle from the current one.
vector ncMoverEntity::GetMoverPosition1 | ( | void | ) |
Returns the starting position.
vector ncMoverEntity::GetMoverPosition2 | ( | void | ) |
Returns the final destination.
vector ncMoverEntity::GetMoverRotation1 | ( | void | ) |
Returns the starting angle.
vector ncMoverEntity::GetMoverRotation2 | ( | void | ) |
Returns the final destination angle.
moverState_t ncMoverEntity::GetMoverState | ( | void | ) |
Returns the movement state.
moverType_t ncMoverEntity::GetMoverType | ( | void | ) |
Returns the movement type.
bool ncMoverEntity::IsMoving | ( | void | ) |
Returns if the ncMoverEntity is currently moving.
void ncMoverEntity::MoveAndRotateToPosition | ( | vector | vecDest, |
vector | vecAngle, | ||
float | flSpeed | ||
) |
Moves and rotates this entity to a desired location.
|
virtual |
Overridable: Called when the mover completes its movement to a destination.
Reimplemented in func_button, func_door, func_door_rotating, func_plat, and func_trackchange.
|
virtual |
Overridable: Called when the mover starts moving from its position to another.
Reimplemented in func_button, func_door, func_door_rotating, func_plat, and func_trackchange.
void ncMoverEntity::MoveToPosition | ( | vector | vecDest, |
float | flSpeed | ||
) |
Moves this entity to the specified position.
void ncMoverEntity::MoveToReverse | ( | float | flSpeed | ) |
Moves to the reverse state.
If a mover is at pos1, it'll go to pos2, etc.
|
virtual |
Similar to ncIO::SpawnKey() but for save-game fields.
Whatever you write into file handles within your ncIO::Save()
method needs to be read back in here.
Reimplemented from ncSurfacePropEntity.
Reimplemented in func_button, func_door, func_door_rotating, func_plat, func_platrot, and func_trackchange.
void ncMoverEntity::RotateToPosition | ( | vector | vecAngle, |
float | flSpeed | ||
) |
Rotates this entity to the desired angle.
void ncMoverEntity::RotateToReverse | ( | float | flSpeed | ) |
Rotates to the reversed state.
|
virtual |
Handles saving a copy of this entity to a given filehandle.
Within you want to use the ncIO::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.
Reimplemented from ncSurfacePropEntity.
Reimplemented in func_button, func_door, func_door_rotating, func_plat, func_platrot, and func_trackchange.
void ncMoverEntity::SetMoverPosition1 | ( | vector | val | ) |
Sets the initial starting position.
void ncMoverEntity::SetMoverPosition2 | ( | vector | val | ) |
Sets the final destination.
void ncMoverEntity::SetMoverRotation1 | ( | vector | val | ) |
Sets the initial starting angle.
void ncMoverEntity::SetMoverRotation2 | ( | vector | val | ) |
Sets the final destination angle.
void ncMoverEntity::SetMoverState | ( | moverState_t | val | ) |
Set the movement state.
void ncMoverEntity::SetMoverType | ( | moverType_t | val | ) |
Set the movement type.
|
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 ncIO.
Reimplemented from ncSurfacePropEntity.
Reimplemented in func_button, func_door, func_door_rotating, func_plat, func_platrot, and func_trackchange.