Nuclide
Software Development Kit for id Tech
env_fog_controller Class Reference
Inheritance diagram for env_fog_controller:
NSPointTrigger

Public Member Functions

void env_fog_controller (void)
 
virtual float StartToBias (void)
 
virtual float FogRender (void)
 
virtual void FogUpdate (void)
 
virtual void RendererRestarted (void)
 Client: Called when video resources need to be allocated or reloaded for the entity. More...
 
virtual void ReceiveEntity (float, float)
 Client: Handles network updates from the server for the associated entity. 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 EvaluateEntity (void)
 Run each tic after physics are run to determine if we need to send updates over the network. More...
 
virtual void Trigger (entity, triggermode_t)
 Called whenever we're legacy triggered by another object or function. 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 Save (float)
 Handles saving a copy of this entity to a given filehandle. More...
 
virtual void Restore (string, string)
 Similar to ::SpawnKey but for save-game fields. More...
 
virtual void SpawnKey (string, string)
 This method handles entity key/value pairs on map load. More...
 
virtual void Input (entity, string, string)
 Called when we are being prompted by another object/function with an input message. More...
 

Detailed Description

QUAKED env_fog_controller (1 .5 0) (-8 -8 -8) (8 8 8) EVFOGCTL_MASTER

OVERVIEW

Controls fog that affects the entire map.

KEYS

  • "targetname" : Name
  • "target" : Name of an entity in the map that light will point at.
  • "fogenable" : Will make the fog start active if not 0.
  • "fogstart" : Distance from the camera of where the fog starts.
  • "fogend" : Distance from the camera of where the fog ends.
  • "fogmaxdensity" : Maximum fog density. Value between 0.00 and 1.00.
  • "farz" : Clip anything after the specified distance.
  • "fogcolor" : Primary color of the fog in RGB255. E.g. '255 0 0' for red.
  • "fogcolor2" : Secondary color of the fog in RGB255. Only used when 'fogblend' is 1.
  • "fogblend" : Whether or not to blend between fogcolor and fogcolor2.
  • "fogdir" : The fog directon for the secondary color. Only used when 'fogblend' is 1.
  • "use_angles" : If we should use the 'angles' key instead of 'fogdir'. Only used when 'fogblend' is 1.

INPUTS

  • "TurnOff" : Turns the entity off.
  • "TurnOn" : Turns the entity on.
  • "Toggle" : Toggles the entity to an on/off state.
  • "SetStartDist" : Sets fogstart.
  • "SetEndDist" : Sets fogend.
  • "SetColor" : Sets fogcolor.
  • "SetColorSecondary" : Sets fogcolor2.
  • "SetFarZ" : Sets farz.

SPAWNFLAGS

  • EVFOGCTL_MASTER (1) : If specified, this one will always take priority over any other active fog controllers... currently unused.

TRIVIA

This entity was introduced in Half-Life 2 (2004).

Constructor & Destructor Documentation

◆ env_fog_controller()

void env_fog_controller::env_fog_controller ( void  )

Member Function Documentation

◆ EvaluateEntity()

virtual void env_fog_controller::EvaluateEntity ( void  )
virtual

Run each tic after physics are run to determine if we need to send updates over the network.

Reimplemented from NSEntity.

◆ FogRender()

float env_fog_controller::FogRender ( void  )
virtual

◆ FogUpdate()

void env_fog_controller::FogUpdate ( void  )
virtual

◆ Input()

virtual void env_fog_controller::Input ( entity  eAct,
string  strInput,
string  strData 
)
virtual

Called when we are being prompted by another object/function with an input message.

Reimplemented from NSEntity.

◆ ReceiveEntity()

void env_fog_controller::ReceiveEntity ( float  flNew,
float  flChanged 
)
virtual

Client: Handles network updates from the server for the associated entity.

Reimplemented from NSEntity.

◆ RendererRestarted()

void env_fog_controller::RendererRestarted ( void  )
virtual

Client: Called when video resources need to be allocated or reloaded for the entity.

Reimplemented from NSEntity.

◆ Respawn()

virtual void env_fog_controller::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 NSPointTrigger.

◆ Restore()

virtual void env_fog_controller::Restore ( string  strKey,
string  strValue 
)
virtual

Similar to ::SpawnKey but for save-game fields.

Whatever you write into file handles within your ::Save() method needs to be read back in here.

Reimplemented from NSPointTrigger.

◆ Save()

virtual void env_fog_controller::Save ( float  handle)
virtual

Handles saving a copy of this entity to a given filehandle.

Within you want to use the ::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.

Reimplemented from NSPointTrigger.

◆ SendEntity()

virtual float env_fog_controller::SendEntity ( entity  ,
float   
)
virtual

Called by the engine whenever we need to send a client an update about this entity.

Reimplemented from NSEntity.

◆ SpawnKey()

virtual void env_fog_controller::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 NSPointTrigger.

◆ StartToBias()

float env_fog_controller::StartToBias ( void  )
virtual

◆ Trigger()

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

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

Reimplemented from NSTrigger.


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