Nuclide
Software Development Kit for id Tech
func_door_rotating Class Reference

Server-Entity: Rotating Door. More...

Inheritance diagram for func_door_rotating:
NSMoverEntity

Public Member Functions

void func_door_rotating (void)
 
virtual void Spawned (void)
 Called when the entity is fulled initialized. More...
 
virtual void SpawnKey (string, string)
 This method handles entity key/value pairs on map load. More...
 
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 Use (void)
 
virtual void Touch (entity)
 Called whenever we're touching another entity. More...
 
virtual void Blocked (entity)
 Called whenever out movement is being blocked by an entity. 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 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 Trigger (entity, triggermode_t)
 Called whenever we're legacy triggered by another object or function. More...
 

Detailed Description

Server-Entity: Rotating Door.

QUAKED func_door_rotating (0 .5 .8) ? SF_ROT_OPEN SF_ROT_BACKWARDS x SF_ROT_PASSABLE SF_ROT_ONEWAY SF_ROT_TOGGLE SF_ROT_ZAXIS SF_ROT_XAXIS SF_ROT_USE SF_ROT_NOMONSTERS

OVERVIEW

Rotating brush door entity. It's basically the same as func_door, it just does not move on any axis, it tilts along a pivot point defined by an origin brush.

KEYS

  • "targetname" : Name
  • "target" : Target when triggered.
  • "killtarget" : Target to kill when triggered.
  • "speed" : Speed at which the door turns.
  • "snd_open" : Sound shader to play for when the door opens.
  • "snd_close" : Sound shader to play for when the door closes.
  • "snd_stop" : Sound shader to play for when the door stops rotating.
  • "movesnd" : Legacy integer value pointing to a predefined move sound.
  • "stopsnd" : Legacy integer value pointing to a predefined stop sound.
  • "distance" : The degrees which the door will turn.
  • "dmg" : The damage inflicted upon objects blocking the way of the door.
  • "wait" : Time that has to pass for the door to automatically close.
  • "netname" : Target to trigger when the door closes back up.

SPAWNFLAGS

  • SF_ROT_OPEN (1) : Door is in the open position by default.
  • SF_ROT_BACKWARDS (2) : Flip the direction of a one-way door.
  • SF_ROT_PASSABLE (8) : Door has no collision model to speak of.
  • SF_ROT_ONEWAY (16) : Door will only open one-way as opposed to both ways.
  • SF_ROT_TOGGLE (32) : Door will have to be triggered by something to open/close.
  • SF_ROT_ZAXIS (64) : Door will tilt along the Z axis.
  • SF_ROT_XAXIS (128) : Door will tilt on the X axis.
  • SF_ROT_USE (256) : Player has to press the 'use' key to interact with it.
  • SF_ROT_NOMONSTERS (512) : Monsters cannot open this door.

NOTES

Please include an origin brush so that a pivot point will be defined.

TRIVIA

This entity was introduced in Quake II (1997).

Constructor & Destructor Documentation

◆ func_door_rotating()

void func_door_rotating::func_door_rotating ( void  )

Member Function Documentation

◆ Blocked()

void func_door_rotating::Blocked ( entity  eBlocker)
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.

◆ MoverFinishesMoving()

void func_door_rotating::MoverFinishesMoving ( void  )
virtual

Overridable: Called when the mover completes its movement to a destination.

Reimplemented from NSMoverEntity.

◆ MoverStartsMoving()

void func_door_rotating::MoverStartsMoving ( void  )
virtual

Overridable: Called when the mover starts moving from its position to another.

Reimplemented from NSMoverEntity.

◆ Respawn()

void func_door_rotating::Respawn ( 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.

◆ Restore()

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

◆ Save()

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

◆ Spawned()

void func_door_rotating::Spawned ( void  )
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.

◆ SpawnKey()

void func_door_rotating::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 NSIO.

Reimplemented from NSMoverEntity.

◆ Touch()

void func_door_rotating::Touch ( entity  eToucher)
virtual

Called whenever we're touching another entity.

Reimplemented from NSTrigger.

◆ Trigger()

void func_door_rotating::Trigger ( entity  act,
triggermode_t  state 
)
virtual

Called whenever we're legacy triggered by another object or function.

Reimplemented from NSTrigger.

◆ Use()

void func_door_rotating::Use ( void  )
virtual

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