Nuclide
Software Development Kit for id Technology (BETA)
ncMoverEntity Class Reference

About this class

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.

Inheritance diagram for ncMoverEntity:
ncSurfacePropEntity func_button func_door func_door_rotating func_plat func_platrot func_trackchange func_trackautochange

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...
 

Constructor & Destructor Documentation

◆ ncMoverEntity()

void ncMoverEntity::ncMoverEntity ( void  )

Member Function Documentation

◆ GetDirectionalPosition()

vector ncMoverEntity::GetDirectionalPosition ( vector  vecAngle,
float  flLip 
)

Returns a directional position from the current one.

◆ GetDirectionalRotation()

vector ncMoverEntity::GetDirectionalRotation ( vector  normalizedAngle,
float  travelDistance 
)

Returns a directional angle from the current one.

◆ GetMoverPosition1()

vector ncMoverEntity::GetMoverPosition1 ( void  )

Returns the starting position.

◆ GetMoverPosition2()

vector ncMoverEntity::GetMoverPosition2 ( void  )

Returns the final destination.

◆ GetMoverRotation1()

vector ncMoverEntity::GetMoverRotation1 ( void  )

Returns the starting angle.

◆ GetMoverRotation2()

vector ncMoverEntity::GetMoverRotation2 ( void  )

Returns the final destination angle.

◆ GetMoverState()

moverState_t ncMoverEntity::GetMoverState ( void  )

Returns the movement state.

◆ GetMoverType()

moverType_t ncMoverEntity::GetMoverType ( void  )

Returns the movement type.

◆ IsMoving()

bool ncMoverEntity::IsMoving ( void  )

Returns if the ncMoverEntity is currently moving.

◆ MoveAndRotateToPosition()

void ncMoverEntity::MoveAndRotateToPosition ( vector  vecDest,
vector  vecAngle,
float  flSpeed 
)

Moves and rotates this entity to a desired location.

◆ MoverFinishesMoving()

void ncMoverEntity::MoverFinishesMoving ( void  )
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.

◆ MoverStartsMoving()

void ncMoverEntity::MoverStartsMoving ( void  )
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.

◆ MoveToPosition()

void ncMoverEntity::MoveToPosition ( vector  vecDest,
float  flSpeed 
)

Moves this entity to the specified position.

◆ MoveToReverse()

void ncMoverEntity::MoveToReverse ( float  flSpeed)

Moves to the reverse state.

If a mover is at pos1, it'll go to pos2, etc.

◆ Restore()

void ncMoverEntity::Restore ( string  strKey,
string  strValue 
)
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.

◆ RotateToPosition()

void ncMoverEntity::RotateToPosition ( vector  vecAngle,
float  flSpeed 
)

Rotates this entity to the desired angle.

◆ RotateToReverse()

void ncMoverEntity::RotateToReverse ( float  flSpeed)

Rotates to the reversed state.

◆ Save()

void ncMoverEntity::Save ( float  handle)
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.

◆ SetMoverPosition1()

void ncMoverEntity::SetMoverPosition1 ( vector  val)

Sets the initial starting position.

◆ SetMoverPosition2()

void ncMoverEntity::SetMoverPosition2 ( vector  val)

Sets the final destination.

◆ SetMoverRotation1()

void ncMoverEntity::SetMoverRotation1 ( vector  val)

Sets the initial starting angle.

◆ SetMoverRotation2()

void ncMoverEntity::SetMoverRotation2 ( vector  val)

Sets the final destination angle.

◆ SetMoverState()

void ncMoverEntity::SetMoverState ( moverState_t  val)

Set the movement state.

◆ SetMoverType()

void ncMoverEntity::SetMoverType ( moverType_t  val)

Set the movement type.

◆ SpawnKey()

void ncMoverEntity::SpawnKey ( string  strKey,
string  strValue 
)
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.


The documentation for this class was generated from the following files: