Nuclide
Software Development Kit for id Tech
infodecal Class Reference

Server-Entity: Decal. More...

Inheritance diagram for infodecal:
NSEntity NSPointTrigger

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 Respawn (void)
 Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state. 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 NSIO::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...
 

Detailed Description

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

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

◆ predraw()

float infodecal::predraw ( void  )
virtual

Reimplemented from NSEntity.

◆ Respawn() [1/2]

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

◆ Respawn() [2/2]

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

◆ Restore()

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

◆ Save()

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

◆ Spawned()

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

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

Reimplemented from NSEntity.

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

Reimplemented from NSEntity.

◆ Trigger()

void infodecal::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 files: