Nuclide
Software Development Kit for id Tech
|
This entity represents an NSRenderableEntity with interactive surface properties. More...
#include <NSSurfacePropEntity.h>
Public Member Functions | |
void | NSSurfacePropEntity (void) |
virtual void | Spawned (void) |
Called when the entity is fulled initialized. More... | |
virtual void | SetModel (string) |
Sets the 3D model representation of the entity from a file path and name. 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 | 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 | Input (entity, string, string) |
Called when we are being prompted by another object/function with an input message. More... | |
virtual void | SpawnKey (string, string) |
This method handles entity key/value pairs on map load. More... | |
virtual void | ParentUpdate (void) |
Called when we need to re-align the entity to our parent entity. 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 float | predraw (void) |
virtual void | ReceiveEntity (float, float) |
Client: Handles network updates from the server for the associated entity. More... | |
nonvirtual bool | IsOnFire (void) |
Returns whether or not this entity is on fire. More... | |
virtual void | Damage (entity, entity, NSDict, float, vector, vector) |
Applies damage to the entity. More... | |
virtual void | DamageFeedback (entity, entity, int) |
Called when a different entity gets damaged by this entity. More... | |
virtual void | Pain (entity, entity, int, vector, int) |
Called whenever the entity receives damage. More... | |
virtual void | Death (entity, entity, int, vector, int) |
Called when the health is equal or below 0. More... | |
virtual void | BreakModel (int, vector, int) |
Called when the health is equal or below 0. More... | |
virtual bool | IsAlive (void) |
Returns whether or not the entity is alive. More... | |
nonvirtual void | Ignite (entity, float, int) |
Sets the entity on fire. More... | |
nonvirtual void | Extinguish (void) |
If the entity is on fire, it'll have it extinguished. More... | |
nonvirtual bool | CanBleed (void) |
Returns whether the entity can bleed. More... | |
nonvirtual bool | IsVulnerable (void) |
Returns whether the entity can be damaged. More... | |
nonvirtual void | EnableBleeding (void) |
Marks the entity as capable of bleeding. More... | |
nonvirtual void | DisableBleeding (void) |
Marks the entity as incapable of bleeding. More... | |
nonvirtual void | EnableAimAssist (void) |
Makes the entity visible to other entity their aim-assists. More... | |
nonvirtual void | DisableAimAssist (void) |
Makes the entity invisible to other entity their aim-assists. More... | |
nonvirtual void | MakeVulnerable (void) |
Makes the entity vulnerable if it wasn't already. More... | |
nonvirtual void | MakeInvulnerable (void) |
Makes the entity invulnerable if it wasn't already. More... | |
nonvirtual void | SetTakedamage (float) |
Deprecated: Sets whether the entity can take damage. More... | |
nonvirtual void | SetHealth (float) |
Sets the current health of the entity. More... | |
nonvirtual void | SetMaxHealth (float) |
Sets the maximum amount of health the entity can have. More... | |
nonvirtual float | GetHealth (void) |
Returns the current health of the entity. More... | |
nonvirtual float | GetMaxHealth (void) |
Returns the maximum health the entity can have. More... | |
nonvirtual void | SetArmor (float) |
Sets the current armor of the entity. More... | |
nonvirtual float | GetArmor (void) |
Returns the current armor of the entity. More... | |
nonvirtual float | GetSpawnHealth (void) |
Returns the health the entity spawned with at map load. More... | |
nonvirtual bool | HasPropData (void) |
Returns if the entity has prop data information set. More... | |
nonvirtual __variant | GetPropData (int) |
Returns a variable type of information about the entity's prop data. More... | |
nonvirtual bool | HasSurfaceData (void) |
Returns if the entity has surface data information set. More... | |
nonvirtual __variant | GetSurfaceData (int) |
Returns a variable type of information about the entity's surface data. More... | |
nonvirtual void | SetSurfaceData (string) |
Assigns the surface data of a given description onto this entity. More... | |
nonvirtual void | SetPropData (string) |
Assigns the prop data of a given description onto this entity. More... | |
nonvirtual float | TimeSinceDeath (void) |
Returns how many seconds have passed since we died. More... | |
nonvirtual bool | CanBeDamaged (vector, vector) |
Returns whether this entity reacts to damage being inflicted. More... | |
nonvirtual void | SetBloodColor (vector) |
Sets the colour of the blood of this entity. More... | |
nonvirtual vector | GetBloodColor (void) |
Returns the blood color of this entity. More... | |
virtual void | RenderFire (void) |
Called every frame to render a fire effect, but will only do so if the entity is burning. More... | |
This entity represents an NSRenderableEntity with interactive surface properties.
It can take damage and can handle variously different types of impact.
|
virtual |
Called when the health is equal or below 0.
bool NSSurfacePropEntity::CanBeDamaged | ( | vector | damageOrigin, |
vector | hitLocation | ||
) |
Returns whether this entity reacts to damage being inflicted.
bool NSSurfacePropEntity::CanBleed | ( | void | ) |
Returns whether the entity can bleed.
|
virtual |
Applies damage to the entity.
Reimplemented in NSClientPlayer.
|
virtual |
Called when a different entity gets damaged by this entity.
|
virtual |
Called when the health is equal or below 0.
Reimplemented in func_breakable, func_guntarget, func_rot_button, NSClientPlayer, NSMonster, NSPhysicsEntity, and NSProjectile.
Makes the entity invisible to other entity their aim-assists.
Makes the entity visible to other entity their aim-assists.
Run each tic after physics are run to determine if we need to send updates over the network.
Reimplemented from NSRenderableEntity.
Reimplemented in func_tracktrain, ambient_generic, speaker, NSClientPlayer, NSClientSpectator, NSMonster, NSPhysicsEntity, NSProjectile, and NSVehicle.
vector NSSurfacePropEntity::GetBloodColor | ( | void | ) |
Returns the blood color of this entity.
__variant NSSurfacePropEntity::GetPropData | ( | int | type | ) |
Returns a variable type of information about the entity's prop data.
Returns the health the entity spawned with at map load.
__variant NSSurfacePropEntity::GetSurfaceData | ( | int | type | ) |
Returns a variable type of information about the entity's surface data.
bool NSSurfacePropEntity::HasPropData | ( | void | ) |
Returns if the entity has prop data information set.
bool NSSurfacePropEntity::HasSurfaceData | ( | void | ) |
Returns if the entity has surface data information set.
Sets the entity on fire.
Called when we are being prompted by another object/function with an input message.
Reimplemented from NSRenderableEntity.
Reimplemented in func_door, func_guntarget, func_plat, ambient_generic, and NSMonster.
|
virtual |
Returns whether or not the entity is alive.
That is different from having health, as the entity may be a corpse that can be destroyed further.
Reimplemented in NSMonster.
bool NSSurfacePropEntity::IsOnFire | ( | void | ) |
Returns whether or not this entity is on fire.
bool NSSurfacePropEntity::IsVulnerable | ( | void | ) |
Returns whether the entity can be damaged.
Makes the entity invulnerable if it wasn't already.
|
virtual |
Called whenever the entity receives damage.
Reimplemented in NSBot, cycler, func_breakable, NSMonster, NSPhysicsEntity, and NSProjectile.
Called when we need to re-align the entity to our parent entity.
Reimplemented from NSEntity.
Reimplemented from NSRenderableEntity.
Reimplemented in NSClient, NSClientPlayer, NSClientSpectator, NSMonster, NSProjectile, and NSTalkMonster.
Client: Handles network updates from the server for the associated entity.
Reimplemented from NSRenderableEntity.
Reimplemented in func_tracktrain, func_tankmortar, prop_vehicle_driveable, speaker, NSClientPlayer, NSClientSpectator, NSMonster, NSPhysicsEntity, NSProjectile, NSTalkMonster, and NSVehicle.
Called every frame to render a fire effect, but will only do so if the entity is burning.
Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state.
Reimplemented from NSRenderableEntity.
Reimplemented in prop_static, button_target, cycler, func_breakable, func_button, func_door, func_door_rotating, func_guntarget, func_physbox, func_plat, func_platrot, func_pushable, func_rot_button, func_tank, func_tracktrain, monster_furniture, monster_generic, prop_dynamic, prop_physics, prop_static, ambient_generic, speaker, NSClientPlayer, NSMonster, NSPhysicsEntity, and NSTalkMonster.
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 NSRenderableEntity.
Reimplemented in func_breakable, func_button, func_door, func_door_rotating, func_guntarget, func_plat, func_platrot, func_pushable, func_rot_button, func_tank, func_trackchange, func_tracktrain, ambient_generic, speaker, NSClient, NSClientPlayer, NSClientSpectator, NSMonster, NSMoverEntity, NSActor, NSPhysicsEntity, NSProjectile, NSSquadMonster, NSTalkMonster, and NSVehicle.
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 NSRenderableEntity.
Reimplemented in func_breakable, func_button, func_door, func_door_rotating, func_guntarget, func_plat, func_platrot, func_pushable, func_rot_button, func_tank, func_trackchange, func_tracktrain, ambient_generic, speaker, NSClient, NSClientPlayer, NSClientSpectator, NSMonster, NSMoverEntity, NSActor, NSPhysicsEntity, NSProjectile, NSSquadMonster, NSTalkMonster, and NSVehicle.
Called by the engine whenever we need to send a client an update about this entity.
Reimplemented from NSRenderableEntity.
Reimplemented in func_tracktrain, ambient_generic, speaker, NSClientPlayer, NSClientSpectator, NSMonster, NSPhysicsEntity, NSProjectile, NSTalkMonster, and NSVehicle.
void NSSurfacePropEntity::SetBloodColor | ( | vector | newColor | ) |
Sets the colour of the blood of this entity.
Sets the maximum amount of health the entity can have.
Sets the 3D model representation of the entity from a file path and name.
Reimplemented from NSEntity.
Assigns the prop data of a given description onto this entity.
Assigns the surface data of a given description onto this entity.
Deprecated: Sets whether the entity can take damage.
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.
Reimplemented in prop_static, func_breakable, func_button, func_door, func_door_rotating, func_guntarget, func_plat, func_pushable, func_tank, func_trackchange, func_tracktrain, ambient_generic, func_tankmortar, prop_vehicle_driveable, speaker, NSMonster, NSPhysicsEntity, NSProjectile, and NSSquadMonster.
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 NSRenderableEntity.
Reimplemented in prop_static, func_breakable, func_button, func_door, func_door_rotating, func_guntarget, func_physbox, func_plat, func_platrot, func_pushable, func_rot_button, func_tank, func_trackchange, func_tracktrain, monster_furniture, prop_dynamic, prop_physics, ambient_generic, speaker, NSMonster, NSMoverEntity, NSPhysicsEntity, NSProjectile, NSSquadMonster, and NSTalkMonster.
Returns how many seconds have passed since we died.
Will return -1 if not applicable.