Nuclide
Software Development Kit for id Technology (BETA)
Loading...
Searching...
No Matches
point_spotlight Class Reference

About this class

Shared-Entity: Spotlight With Beam.

QUAKED point_spotlight (1 .5 0) (-8 -8 -8) (8 8 8) PNTSPTLGHT_STARTON PNTSPTLGHT_NOLIGHT

OVERVIEW

An entity that draws a spotlight, with beam. Will also spawn a dynamic light, unless specifically disabled via the spawnflags field.

KEYS

  • "targetname" : Name
  • "target" : Name of an entity in the map that light will point at.
  • "spotlightlength" : Beam length
  • "spotlightwidth" : Beam width
  • "rendercolor" : Beam color
  • "HDRColorScale" : Multiplier that's active when running in HDR (unused)

INPUTS

  • "LightOff" : Turns the entity off.
  • "LightOn" : Turns the entity on.

SPAWNFLAGS

  • PNTSPTLGHT_STARTON (1) : Start enabled.
  • PNTSPTLGHT_NOLIGHT (2) : No dynamic light

TRIVIA

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

Inheritance diagram for point_spotlight:
ncPointTrigger

Public Member Functions

void point_spotlight (void)
 
virtual void ReceiveEntity (float, float)
 Client: Handles network updates from the server for the associated entity.
 
virtual float predraw (void)
 
nonvirtual void UpdateBeamLength (void)
 
nonvirtual float BeamViewDelta (vector, vector)
 
nonvirtual float FlareViewDelta (float, vector)
 
nonvirtual void SetBeamMaterial (string)
 
nonvirtual void SetGlowMaterial (string)
 
nonvirtual void SetRenderColor (vector)
 
nonvirtual void SetLightStyle (float)
 
virtual void ReloadVideoResources (void)
 Client: Called when video resources need to be allocated or reloaded for the entity.
 
virtual void Trigger (entity, triggermode_t)
 Called whenever we're legacy triggered by another object or function.
 
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.
 
virtual float SendEntity (entity, float)
 Called by the engine whenever we need to send a client an update about this entity.
 
virtual void SpawnKey (string, string)
 This method handles entity key/value pairs on map load.
 
virtual void EvaluateEntity (void)
 Run each tic after physics are run to determine if we need to send updates over the network.
 
virtual void Input (entity, string, string)
 Called when we are being prompted by another object/function with an input message.
 
nonvirtual void SetBeamWidth (float)
 
nonvirtual void SetBeamLength (float)
 

Public Attributes

vector m_vecBeamEnd
 
float m_flBeamTrace
 
float m_flBeamHalfwidth
 
string m_flareMaterial
 
string m_coneMaterial
 

Constructor & Destructor Documentation

◆ point_spotlight()

void point_spotlight::point_spotlight ( void )

Member Function Documentation

◆ BeamViewDelta()

float point_spotlight::BeamViewDelta ( vector vecPlayer,
vector cameraAngle )

◆ EvaluateEntity()

void point_spotlight::EvaluateEntity ( void )
virtual

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

Reimplemented from ncEntity.

◆ FlareViewDelta()

float point_spotlight::FlareViewDelta ( float beamDelta,
vector cameraAngle )

◆ Input()

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

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

Reimplemented from ncEntity.

◆ predraw()

float point_spotlight::predraw ( void )
virtual

Reimplemented from ncEntity.

◆ ReceiveEntity()

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

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

Reimplemented from ncEntity.

◆ ReloadVideoResources()

void point_spotlight::ReloadVideoResources ( void )
virtual

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

Reimplemented from ncEntity.

◆ Respawn()

void point_spotlight::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 ncPointTrigger.

◆ SendEntity()

float point_spotlight::SendEntity ( entity ,
float  )
virtual

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

Reimplemented from ncEntity.

◆ SetBeamLength()

void point_spotlight::SetBeamLength ( float beamLength)

◆ SetBeamMaterial()

void point_spotlight::SetBeamMaterial ( string beamMaterial)

◆ SetBeamWidth()

void point_spotlight::SetBeamWidth ( float newWidth)

◆ SetGlowMaterial()

void point_spotlight::SetGlowMaterial ( string glowMaterial)

◆ SetLightStyle()

void point_spotlight::SetLightStyle ( float newStyle)

◆ SetRenderColor()

void point_spotlight::SetRenderColor ( vector renderColor)

◆ SpawnKey()

void point_spotlight::SpawnKey ( string keyName,
string setValue )
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 ncEntity.

◆ Trigger()

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

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

Reimplemented from ncTrigger.

◆ UpdateBeamLength()

void point_spotlight::UpdateBeamLength ( void )

Member Data Documentation

◆ m_coneMaterial

string point_spotlight::m_coneMaterial

◆ m_flareMaterial

string point_spotlight::m_flareMaterial

◆ m_flBeamHalfwidth

float point_spotlight::m_flBeamHalfwidth

◆ m_flBeamTrace

float point_spotlight::m_flBeamTrace

◆ m_vecBeamEnd

vector point_spotlight::m_vecBeamEnd

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