Nuclide
Software Development Kit for id Tech
prop_static Class Reference

Server-Entity: Static Prop Model. More...

Inheritance diagram for prop_static:
NSEntity NSPhysicsEntity

Public Member Functions

void prop_static (void)
 
virtual void SpawnKey (string, string)
 This method handles entity key/value pairs on map load. 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 Spawned (void)
 Called when the entity is fulled initialized. More...
 
virtual bool CanSpawn (bool)
 Returns if this entity can spawned from the map file. More...
 
void prop_static (void)
 
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...
 

Detailed Description

Server-Entity: Static Prop Model.

QUAKED prop_static (1 0 0) (-8 -8 -8) (8 8 8) SF_BASIC_COL

OVERVIEW

Decorative model entity that gets baked into the level file.

KEYS

  • "model" : Model file that will be displayed by the entity.
  • "modelscale" : Scale modifier of the model. Default is "1".
  • "modelscale_vec" : Scale modifier, but in vector format
  • "angles" : Sets the pitch, yaw and roll angles of the model.
  • "_cs" : Toggles if the prop casts a shadow or not.
  • "_ls" : Lightmap scale multiplier for the resulting surfaces.
  • "_sn" : Shading angle related to lightmap phong shading.
  • "_remap" : Force the model surfaces to use a specified material.

NOTES

After compilation, the source model is no longer required and the resulting entity is removed. This ensures that models are rendered in the same batch as the world. This makes sense for one giant unique model in the map, but for multiple repetitive uses of the same model you'll actually waste disk space and memory. Use wisely.

TRIVIA

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

Constructor & Destructor Documentation

◆ prop_static() [1/2]

void prop_static::prop_static ( void  )

◆ prop_static() [2/2]

void prop_static::prop_static ( void  )

Member Function Documentation

◆ CanSpawn()

bool prop_static::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.

◆ Respawn() [1/2]

void prop_static::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 prop_static::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.

◆ Spawned()

void prop_static::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()

void prop_static::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.


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