Nuclide
Software Development Kit for id Technology
|
This entity class represents inventory items, weapons.
QUAKED NSItem (0 0.8 0.8) (-16 -16 0) (16 16 72)
Represents any item within the players' inventory. These can be used, or be dormant.
Public Member Functions | |
void | NSItem (void) |
virtual void | Spawned (void) |
Called when the entity is fulled initialized. More... | |
virtual bool | ItemPickupCheck (entity) |
virtual void | Touch (entity) |
Called whenever we're touching another entity. 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 | SpawnKey (string, string) |
This method handles entity key/value pairs on map load. More... | |
virtual void | Input (entity, string, string) |
Called when we are being prompted by another object/function with an input message. 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 | EvaluateEntity (void) |
Run each tic after physics are run to determine if we need to send updates over the network. More... | |
virtual float | SendEntity (entity, float) |
Called by the engine whenever we need to send a client an update about this entity. More... | |
nonvirtual void | SetFloating (int) |
nonvirtual bool | GetFloating (void) |
nonvirtual void | SetSpinning (bool) |
nonvirtual bool | GetSpinning (void) |
nonvirtual void | PickupRespawn (void) |
virtual void | OnInventoryUse (void) |
virtual void | OnPickup (void) |
Overridable: Called when this item is picked up. More... | |
virtual void | OnUse (entity) |
Overridable: Called when this item is used. More... | |
virtual void | PrintDebugInfo (void) |
nonvirtual void | BecomePickup (void) |
Call to turn a weapon into a pickup. More... | |
virtual void | AddedToInventory (void) |
Called when an item was added to someones inventory. More... | |
virtual void | RemovedFromInventory (void) |
Called when an item was removed from someones inventory. More... | |
virtual void | ReceiveEntity (float, float) |
Client: Handles network updates from the server for the associated entity. More... | |
virtual void | ReceiveEvent (float) |
virtual void | PredictPreFrame (void) |
virtual void | PredictPostFrame (void) |
virtual bool | IsWeapon (void) |
virtual bool | InInventory (void) |
void NSItem::NSItem | ( | void | ) |
|
virtual |
Called when an item was added to someones inventory.
Reimplemented in NSWeapon.
void NSItem::BecomePickup | ( | void | ) |
Call to turn a weapon into a pickup.
|
virtual |
Run each tic after physics are run to determine if we need to send updates over the network.
Reimplemented from NSPhysicsEntity.
Reimplemented in NSWeapon.
bool NSItem::GetFloating | ( | void | ) |
bool NSItem::GetSpinning | ( | void | ) |
|
virtual |
|
virtual |
Called when we are being prompted by another object/function with an input message.
Reimplemented from NSSurfacePropEntity.
|
virtual |
Reimplemented in NSWeapon.
|
virtual |
|
virtual |
|
virtual |
Overridable: Called when this item is picked up.
|
virtual |
Overridable: Called when this item is used.
void NSItem::PickupRespawn | ( | void | ) |
|
virtual |
Reimplemented in NSWeapon.
|
virtual |
Reimplemented in NSWeapon.
|
virtual |
|
virtual |
Client: Handles network updates from the server for the associated entity.
Reimplemented from NSPhysicsEntity.
Reimplemented in NSWeapon.
|
virtual |
|
virtual |
Called when an item was removed from someones inventory.
Reimplemented in NSWeapon.
|
virtual |
Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state.
Reimplemented from NSPhysicsEntity.
|
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 NSPhysicsEntity.
Reimplemented in NSWeapon.
|
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 NSPhysicsEntity.
Reimplemented in NSWeapon.
|
virtual |
Called by the engine whenever we need to send a client an update about this entity.
Reimplemented from NSPhysicsEntity.
Reimplemented in NSWeapon.
void NSItem::SetFloating | ( | int | i | ) |
void NSItem::SetSpinning | ( | bool | value | ) |
|
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 NSPhysicsEntity.
Reimplemented in NSWeapon.
|
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 NSPhysicsEntity.
Reimplemented in NSWeapon.
|
virtual |
Called whenever we're touching another entity.
Reimplemented from NSPhysicsEntity.