Nuclide
Software Development Kit for id Tech
|
This entity class represents weapon based items. More...
#include <NSWeapon.h>
Public Member Functions | |
void | NSWeapon (void) |
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 | Spawned (void) |
Called when the entity is fulled initialized. More... | |
virtual void | SpawnKey (string, string) |
This method handles entity key/value pairs on map load. 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... | |
virtual void | ClientFX (bool) |
virtual void | PredictPreFrame (void) |
virtual void | PredictPostFrame (void) |
virtual void | ReceiveEntity (float, float) |
Client: Handles network updates from the server for the associated entity. More... | |
virtual void | ReceiveEvent (float) |
virtual bool | IsWeapon (void) |
virtual bool | HasReserveAmmo (void) |
virtual void | Draw (void) |
Overridable: Called when we switch to this weapon. More... | |
virtual void | Holster (void) |
Overridable: Called when we are about to switch to another weapon. More... | |
virtual void | PrimaryAttack (void) |
Overridable: On +attack execution. More... | |
virtual void | SecondaryAttack (void) |
Overridable: On +attack2 execution. More... | |
virtual void | Reload (void) |
Overridable: On +reload execution. More... | |
virtual void | Release (void) |
Overridable: When no buttons are held. More... | |
virtual void | UpdateGUI (void) |
Overridable: When the HUD is requested to be drawn. More... | |
nonvirtual void | SetViewModel (string) |
nonvirtual void | SetWorldModel (string) |
nonvirtual void | SetPlayerModel (string) |
nonvirtual void | SetWeaponFrame (float) |
virtual void | SetAttackNext (float) |
virtual void | SetIdleNext (float) |
virtual bool | CanFire (void) |
virtual bool | CanIdle (void) |
virtual bool | UseAmmo (string) |
virtual void | FiredWeapon (string) |
Overridable: Called when the weapon has been fired. More... | |
virtual void | ReleasedWeapon (string) |
Overridable: Called when the weapon has been released. More... | |
virtual void | SwitchedToWeapon (void) |
Overridable: Called when we've switched to this weapon successfully. More... | |
virtual void | SwitchedFromWeapon (void) |
Overridable: Called when we've switched from this weapon successfully. More... | |
virtual void | UpdateFireInfoCache (void) |
Overridable: Called when the fireInfo changed. More... | |
nonvirtual void | SwitchFireInfo (string) |
Set the active fire Info of the weapon to this one. More... | |
nonvirtual bool | DetonateDef (string) |
nonvirtual void | Attack (string) |
This entity class represents weapon based items.
QUAKED NSWeapon (0 0.8 0.8) (-16 -16 0) (16 16 72)
This entity class represents weapon based items. It is based on NSItem. The only difference is that the attack related keys get forwarded only to items of this class.
Called when an item was added to someones inventory.
Reimplemented from NSItem.
|
virtual |
|
virtual |
|
virtual |
bool NSWeapon::DetonateDef | ( | string | defName | ) |
Run each tic after physics are run to determine if we need to send updates over the network.
Reimplemented from NSItem.
Overridable: Called when the weapon has been fired.
|
virtual |
Overridable: Called when we are about to switch to another weapon.
Client: Handles network updates from the server for the associated entity.
Reimplemented from NSItem.
Overridable: Called when the weapon has been released.
Called when an item was removed from someones inventory.
Reimplemented from NSItem.
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 NSItem.
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 NSItem.
Called by the engine whenever we need to send a client an update about this entity.
Reimplemented from NSItem.
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 NSItem.
Overridable: Called when we've switched from this weapon successfully.
Overridable: Called when we've switched to this weapon successfully.
Overridable: Called when the fireInfo changed.
Cache values here.
|
virtual |