Nuclide
Software Development Kit for id Tech
item_food Class Reference
Inheritance diagram for item_food:
NSRenderableEntity

Public Member Functions

void item_food (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...
 
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...
 
nonvirtual void Setup (void)
 
virtual void Touch (entity)
 Called whenever we're touching another entity. More...
 

Detailed Description

QUAKED item_food (1 0 0) (-8 -8 -8) (8 8 8)

OVERVIEW

This is a food item that will give the user 1 health when touched.

KEYS

  • "targetname" : Name
  • "angles" : Sets the pitch, yaw and roll angles of the model.
  • "model" : Model file that will be displayed by the entity.

TRIVIA

This entity was introduced in Half-Life (1998). It's also known as item_sodacan.

Constructor & Destructor Documentation

◆ item_food()

void item_food::item_food ( void  )

Member Function Documentation

◆ Respawn()

void item_food::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 NSRenderableEntity.

◆ Restore()

void item_food::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 NSRenderableEntity.

◆ Save()

void item_food::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 NSRenderableEntity.

◆ Setup()

void item_food::Setup ( void  )

◆ Touch()

void item_food::Touch ( entity  eToucher)
virtual

Called whenever we're touching another entity.

Reimplemented from NSTrigger.


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