Nuclide
Software Development Kit for id Technology
|
This entity represents an NSRenderableEntity with interactive surface properties.
It can take damage and can handle variously different types of impact.
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, vector, int) |
Called whenever the entity receives damage. More... | |
virtual void | Death (entity, entity, int, vector, 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 | 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 void | SetMaxArmor (float) |
Sets the maximum amount of armor the entity can have. More... | |
nonvirtual float | GetMaxArmor (void) |
Returns the maximum armor value the entity can have. More... | |
nonvirtual float | GetSpawnHealth (void) |
Returns the health the entity spawned with at map load. 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... | |
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 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... | |
virtual void | RenderFire (void) |
Called every frame to render a fire effect, but will only do so if the entity is burning. More... | |
void NSSurfacePropEntity::NSSurfacePropEntity | ( | void | ) |
|
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.
void NSSurfacePropEntity::DisableAimAssist | ( | void | ) |
Makes the entity invisible to other entity their aim-assists.
void NSSurfacePropEntity::DisableBleeding | ( | void | ) |
Marks the entity as incapable of bleeding.
void NSSurfacePropEntity::EnableAimAssist | ( | void | ) |
Makes the entity visible to other entity their aim-assists.
void NSSurfacePropEntity::EnableBleeding | ( | void | ) |
Marks the entity as capable of bleeding.
|
virtual |
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, NSItem, NSMonster, NSPhysicsEntity, NSProjectile, NSRagdoll, NSVehicle, and NSWeapon.
void NSSurfacePropEntity::Extinguish | ( | void | ) |
If the entity is on fire, it'll have it extinguished.
float NSSurfacePropEntity::GetArmor | ( | void | ) |
Returns the current armor of the entity.
vector NSSurfacePropEntity::GetBloodColor | ( | void | ) |
Returns the blood color of this entity.
float NSSurfacePropEntity::GetHealth | ( | void | ) |
Returns the current health of the entity.
float NSSurfacePropEntity::GetMaxArmor | ( | void | ) |
Returns the maximum armor value the entity can have.
float NSSurfacePropEntity::GetMaxHealth | ( | void | ) |
Returns the maximum health the entity can have.
__variant NSSurfacePropEntity::GetPropData | ( | int | type | ) |
Returns a variable type of information about the entity's prop data.
float NSSurfacePropEntity::GetSpawnHealth | ( | void | ) |
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.
void NSSurfacePropEntity::Ignite | ( | entity | attacker, |
float | flLifetime, | ||
int | iWeapon | ||
) |
Sets the entity on fire.
|
virtual |
Called when we are being prompted by another object/function with an input message.
Reimplemented from NSRenderableEntity.
Reimplemented in func_door, func_door_rotating, func_guntarget, func_plat, func_tracktrain, ambient_generic, NSClientPlayer, NSItem, NSMonster, and NSActor.
|
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.
void NSSurfacePropEntity::MakeInvulnerable | ( | void | ) |
Makes the entity invulnerable if it wasn't already.
void NSSurfacePropEntity::MakeVulnerable | ( | void | ) |
Makes the entity vulnerable if it wasn't already.
|
virtual |
Called whenever the entity receives damage.
Reimplemented in NSBot, cycler, func_breakable, NSMonster, NSPhysicsEntity, and NSProjectile.
|
virtual |
Called when we need to re-align the entity to our parent entity.
Reimplemented from NSEntity.
|
virtual |
Reimplemented from NSRenderableEntity.
Reimplemented in NSClient, NSClientPlayer, NSClientSpectator, NSMonster, NSProjectile, NSRagdoll, and NSTalkMonster.
|
virtual |
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, NSItem, NSMonster, NSPhysicsEntity, NSProjectile, NSRagdoll, NSTalkMonster, NSVehicle, and NSWeapon.
|
virtual |
Called every frame to render a fire effect, but will only do so if the entity is burning.
|
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.
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, NSItem, NSMonster, NSPhysicsEntity, and NSTalkMonster.
|
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 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, NSAttack, NSClient, NSClientPlayer, NSClientSpectator, NSItem, NSMonster, NSMoverEntity, NSActor, NSPhysicsEntity, NSProjectile, NSSquadMonster, NSTalkMonster, NSVehicle, and 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 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, NSAttack, NSClient, NSClientPlayer, NSClientSpectator, NSItem, NSMonster, NSMoverEntity, NSActor, NSPhysicsEntity, NSProjectile, NSSquadMonster, NSTalkMonster, NSVehicle, and NSWeapon.
|
virtual |
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, NSItem, NSMonster, NSPhysicsEntity, NSProjectile, NSRagdoll, NSTalkMonster, NSVehicle, and NSWeapon.
void NSSurfacePropEntity::SetArmor | ( | float | new_armor | ) |
Sets the current armor of the entity.
void NSSurfacePropEntity::SetBloodColor | ( | vector | newColor | ) |
Sets the colour of the blood of this entity.
void NSSurfacePropEntity::SetHealth | ( | float | new_health | ) |
Sets the current health of the entity.
void NSSurfacePropEntity::SetMaxArmor | ( | float | new_armor | ) |
Sets the maximum amount of armor the entity can have.
void NSSurfacePropEntity::SetMaxHealth | ( | float | new_health | ) |
Sets the maximum amount of health the entity can have.
|
virtual |
Sets the 3D model representation of the entity from a file path and name.
Reimplemented from NSEntity.
Reimplemented in NSPhysicsEntity.
void NSSurfacePropEntity::SetPropData | ( | string | type | ) |
Assigns the prop data of a given description onto this entity.
void NSSurfacePropEntity::SetSurfaceData | ( | string | type | ) |
Assigns the surface data of a given description onto this entity.
|
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.
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, NSAttack, NSClientPlayer, NSItem, NSMonster, NSActor, NSPhysicsEntity, NSProjectile, NSSquadMonster, and 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 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, NSAttack, NSItem, NSMonster, NSMoverEntity, NSPhysicsEntity, NSProjectile, NSSquadMonster, NSTalkMonster, and NSWeapon.
float NSSurfacePropEntity::TimeSinceDeath | ( | void | ) |
Returns how many seconds have passed since we died.
Will return -1 if not applicable.