Nuclide
Software Development Kit for id Technology (BETA)

About this class

Server-Entity: Decal.

QUAKED infodecal (1 0 0) (-8 -8 -8) (8 8 8)

OVERVIEW

Projects a decals.wad texture onto the nearest surface. It'll automatically figure out the surface based on distance. The texture will be aligned along the surface texture normals.

KEYS

  • "targetname" : Name
  • "texture" : Name of the texture inside decals.wad it projects onto a surface.

NOTES

This entity currently only works on BSP version 30 levels.

If a targetname is supplied, it will have to be triggered by an entity in order to appear. Afterwards it cannot be triggered again.

It will pick the nearest wall (currently checking a distance of 128 units, which is probably overkill). No angle has to be supplied.

TRIVIA

This entity was introduced in Half-Life (1998).

Inheritance diagram for infodecal:
ncEntity ncPointTrigger

Public Member Functions

void infodecal (void)
 
virtual void SpawnKey (string, string)
 This method handles entity key/value pairs on map load. More...
 
virtual float predraw (void)
 
virtual bool CanSpawn (bool)
 Returns if this entity can spawned from the map file. More...
 
virtual void Spawned (void)
 Called when the entity is fulled initialized. More...
 
void infodecal (void)
 
virtual void SpawnKey (string, string)
 This method handles entity key/value pairs on map load. More...
 
virtual void Spawned (void)
 Called when the entity is fulled initialized. 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 ncIO::SpawnKey() but for save-game fields. More...
 
virtual void Trigger (entity, triggermode_t)
 Called whenever we're legacy triggered by another object or function. More...
 

Constructor & Destructor Documentation

◆ infodecal() [1/2]

void infodecal::infodecal ( void  )

◆ infodecal() [2/2]

void infodecal::infodecal ( void  )

Member Function Documentation

◆ CanSpawn()

bool infodecal::CanSpawn ( bool  clientSide)
virtual

Returns if this entity can spawned from the map file.

Parameters
clientSideIf it's being spawned on the client-side.

Reimplemented from ncEntity.

◆ predraw()

float infodecal::predraw ( void  )
virtual

Reimplemented from ncEntity.

◆ Respawn()

void infodecal::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 ncEntity.

◆ Restore()

void infodecal::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 ncEntity.

◆ Save()

void infodecal::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 ncEntity.

◆ Spawned() [1/2]

void infodecal::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 ncEntity.

◆ Spawned() [2/2]

virtual void infodecal::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 ncEntity.

◆ SpawnKey() [1/2]

void infodecal::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 ncEntity.

◆ SpawnKey() [2/2]

virtual void infodecal::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 ncEntity.

◆ Trigger()

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

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

Reimplemented from ncTrigger.


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