Nuclide
Software Development Kit for id Technology (BETA)
|
ncEntity is the lowest of the user-accessible entity class.
It's responsible for handling practically every entity in Nuclide.
Try to avoid using the built-in 'entity' type unless you know exactly what you are doing. Otherwise, you will deal with loss of savegames and much more.
Public Member Functions | |
void | ncEntity (void) |
The constructor. More... | |
virtual void | ReceiveEntity (float, float) |
Client: Handles network updates from the server for the associated entity. More... | |
virtual void | ReceiveEvent (float) |
virtual float | predraw (void) |
virtual void | postdraw (void) |
Client: Run after the rendering of 3D world is complete. More... | |
virtual void | RendererRestarted (void) |
Client: Called when video resources need to be allocated or reloaded for the entity. More... | |
virtual void | SpawnKey (string, string) |
This method handles entity key/value pairs on map load. More... | |
virtual void | Spawned (void) |
Called when the entity is fulled initialized. More... | |
nonvirtual void | Spawn (void) |
virtual void | MakeStatic (void) |
Tells the engine to make the entity static, effectively making it inaccessible. More... | |
virtual bool | CanSpawn (bool clientSide) |
Returns if this entity can spawned from the map file. More... | |
nonvirtual bool | HasModel (void) |
Returns if this entity has a model set. 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 | Save (float) |
Handles saving a copy of this entity to a given filehandle. More... | |
virtual void | Restore (string, string) |
Similar to ncIO::SpawnKey() but for save-game fields. More... | |
virtual void | ParentUpdate (void) |
Called when we need to re-align the entity to our parent entity. More... | |
nonvirtual void | Event_SpawnDefRelative (string, float, float, float) |
nonvirtual bool | SharesPVSWithPlayer (void) |
virtual void | DebugDraw (void) |
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 entity | GetParent (void) |
Returns the entity this is parented to. More... | |
nonvirtual void | SetParent (string) |
Call this to parent the entity to another entity. More... | |
nonvirtual void | SetParentAttachment (string) |
Call this to parent the entity to an attachment of another entity. More... | |
nonvirtual void | ClearParent (void) |
Call this on an entity to remove the connection to its parent. More... | |
nonvirtual void | RestoreAngles (void) |
Restore the entity's angles to the value the spawndata contains. More... | |
nonvirtual void | ClearAngles (void) |
Unsets any any angle related values within the entity. More... | |
nonvirtual void | UseBy (entity) |
Simulates the press of the use/activate key, with the passed entity being the activator. More... | |
nonvirtual void | ForceNetworkUpdate (void) |
Forces the entity to re-network updates to all clients. More... | |
nonvirtual void | SetEffects (__int32) |
Sets the whole effects field. More... | |
nonvirtual void | AddEffects (__int32) |
Appends one or more effects to the entity. More... | |
nonvirtual void | RemoveEffects (__int32) |
Removes one or more effects from the entity. More... | |
nonvirtual void | SetFrame (float) |
Sets the framegroup sequence of the entity. More... | |
nonvirtual void | SetSkin (float) |
Sets the skingroup of the entity. More... | |
nonvirtual void | SetScale (float) |
Sets the scale of the entity. More... | |
nonvirtual void | SetOwner (entity) |
Sets the owner of the entity. More... | |
nonvirtual void | SetVelocity (vector) |
Sets the movement velocity of the given entity. More... | |
nonvirtual void | AddAngularVelocity (vector) |
Adds onto the existing angular velocity. More... | |
nonvirtual void | AddVelocity (vector) |
Adds onto the existing velocity. More... | |
nonvirtual void | SetTouch (void()) |
Overrides the touch function of a the entity to the specified function. More... | |
nonvirtual void | SetSendFlags (float) |
Overrides the field that's used to determine which information should be networked. More... | |
nonvirtual void | SetSolid (float) |
Sets the collision type of the entity. More... | |
virtual void | SetModel (string) |
Sets the 3D model representation of the entity from a file path and name. More... | |
nonvirtual void | SetModelindex (float) |
Sets the 3D model representation of the entity from an already precached resource id. More... | |
nonvirtual void | SetMovetype (float) |
Sets the movement type of the entity. More... | |
nonvirtual void | SetGravity (float) |
Sets the gravitational modifier of the entity. More... | |
nonvirtual void | SetAngles (vector) |
Sets the direction the entity is facing in eueler angles. More... | |
nonvirtual void | SetAngularVelocity (vector) |
Sets the angular velocity of the entity in degrees per second on each axis. More... | |
nonvirtual void | SetOrigin (vector) |
Sets the absolute 3D world position of the entity. More... | |
nonvirtual void | SetOriginUnstick (vector) |
Same as SetOrigin(), but will push the entity out the ground if needed. More... | |
nonvirtual void | SetSize (vector, vector) |
Sets the bounding box size of the entity. More... | |
nonvirtual void | AddFlags (float) |
Adds one or more engine specific flags to the entity. More... | |
nonvirtual void | RemoveFlags (float) |
Remove one or more engine specific flags from the entity. More... | |
nonvirtual void | AddVFlags (float) |
Adds one or more nuclide specific flags to the entity. More... | |
nonvirtual void | RemoveVFlags (float) |
Remove one or more nuclide specific flags from the entity. More... | |
nonvirtual void | TurnTo (float) |
Turns to the specified angle. More... | |
nonvirtual void | TurnToPos (vector) |
Turns towards the specified position. More... | |
nonvirtual __int32 | GetEffects (void) |
Returns a bitfield of the active effects running on the entity. More... | |
nonvirtual float | GetFrame (void) |
Returns the currently active framegroup of the entity. More... | |
nonvirtual float | GetSkin (void) |
Returns the currently equipped skin of the entity. More... | |
nonvirtual float | GetScale (void) |
Returns the scale modifier of the entity. More... | |
nonvirtual entity | GetOwner (void) |
Returns the owner of the entity. More... | |
nonvirtual vector | GetVelocity (void) |
Returns the movement velocity of the entity. More... | |
nonvirtual float | GetSolid (void) |
Returns the collision type of the entity. More... | |
nonvirtual string | GetModel (void) |
Returns the name of the 3D model representation of the entity. More... | |
nonvirtual float | GetModelindex (void) |
Returns the model id of the 3D model representation of the entity. More... | |
nonvirtual float | GetMovetype (void) |
Returns the movement type of the entity. More... | |
nonvirtual float | GetGravity (void) |
Returns the gravity modifier of the entity. More... | |
nonvirtual vector | GetAngles (void) |
Returns the direction the entity is facing in euler angles. More... | |
nonvirtual vector | GetAngularVelocity (void) |
Returns the direction the entity is spinning in degrees per second for each axis. More... | |
nonvirtual vector | GetOrigin (void) |
Returns the absolute world position of the entity. More... | |
nonvirtual vector | GetSize (void) |
Returns the virtual size of the entity. More... | |
nonvirtual vector | GetMins (void) |
Returns the bounding box mins of the entity. More... | |
nonvirtual vector | GetMaxs (void) |
Returns the bounding box maxs of the entity. More... | |
nonvirtual vector | GetRealMins (void) |
Returns the actual bounding box mins of the entity, before having been affected by scale modifiers. More... | |
nonvirtual vector | GetRealMaxs (void) |
Returns the actual bounding box maxs of the entity, before having been affected by scale modifiers. More... | |
nonvirtual vector | GetAbsoluteMins (void) |
Returns the absolute bounding box mins of the entity, instead of being relative to the world position. More... | |
nonvirtual vector | GetAbsoluteMaxs (void) |
Returns the absolute bounding box maxs of the entity, instead of being relative to the world position. More... | |
nonvirtual float | GetFlags (void) |
Returns an engine flags bitfield that the entity associates with. More... | |
nonvirtual float | HasFlags (float) |
Returns true if the entity has the specified engine flags. More... | |
nonvirtual float | GetVFlags (void) |
Returns a nuclide flags bitfield that the entity associates with. More... | |
nonvirtual float | HasVFlags (float) |
Returns true if the entity has the specified, nuclide specific, flags. More... | |
nonvirtual void | ClearVelocity (void) |
When called, will clear anything related to physical movement on the entity. More... | |
nonvirtual vector | GetEyePos (void) |
Returns the absolute world position of where the eyes are located. More... | |
nonvirtual void | SetEyePos (vector) |
Sets the relative position of the eyes. More... | |
nonvirtual vector | GetViewAngle (void) |
Returns an euler angle of where the entity is 'looking' at. More... | |
nonvirtual void | Show (void) |
When called, will unhide the entity. More... | |
nonvirtual void | Hide (void) |
When called, the entity will stop being rendered on the client. More... | |
nonvirtual bool | IsHidden (void) |
Returns if the entity is currently being hidden explicitly. More... | |
nonvirtual bool | IsSolid (void) |
Returns if the entity is solid or non-solid. More... | |
nonvirtual void | Disappear (void) |
When called it'll make the entity uninteractable (but not destroy it). More... | |
nonvirtual void | UpdateBounds (void) |
Call this if you want to update bounding boxes to take angles into account. More... | |
nonvirtual float | EntIndex (void) |
Returns the unique entity id of the entity. More... | |
nonvirtual bool | DropToFloor (void) |
When called, will drop the entity down onto the surface it's hovering over. More... | |
nonvirtual vector | GetForward (void) |
Returns a normalized forward vector of the entity to more easily test which way it's facing. More... | |
nonvirtual vector | GetRight (void) |
Returns a normalized right vector of the entity to more easily test what's right next to it. More... | |
nonvirtual vector | GetUp (void) |
Returns a normalized up vector of the entity to more easily test what may be above it. More... | |
nonvirtual vector | WorldSpaceCenter (void) |
Returns absolute world coordinates of the center of the entity according to its pivot point. More... | |
nonvirtual float | WaterLevel (void) |
Returns the water level the entity is in. More... | |
nonvirtual bool | Visible (entity) |
Returns if the entity is visible by another entity and a field of view of 90 degrees. More... | |
nonvirtual bool | VisibleVec (vector) |
Returns if the entity is visible from a given position and a field of view of 90 degrees. More... | |
nonvirtual float | DistanceFromYaw (vector) |
Returns a normalized value of how far away the target is from the entity's view direction. More... | |
nonvirtual bool | HasSpawnFlags (float) |
Returns if the entity has any spawnflags set. More... | |
nonvirtual bool | IsOnGround (void) |
Returns if the entity is aligned to the ground. More... | |
nonvirtual entity | GetGroundEntity (void) |
Returns the entity we're standing on. More... | |
nonvirtual bool | CreatedByMap (void) |
Returns if the entity was spawned by the map we're on. More... | |
nonvirtual bool | WithinBounds (entity) |
Returns whether or not we are fully within the bounds of a given entity. More... | |
nonvirtual bool | IntersectsWith (entity) |
Returns whether or not the given entity insersects with us. More... | |
nonvirtual bool | StartSound (string, float, float, bool) |
Plays a sound sample directly onto the entity. More... | |
nonvirtual bool | StartSoundDef (string, float, bool) |
Plays a soundDef on the entity. More... | |
nonvirtual void | StopSound (float, bool) |
Stops a sound sample or soundDef that is playing on the given channel. More... | |
nonvirtual vector | NearestWallPointForRadius (float) |
Returns the nearest point on a wall of this entity within a specified radius. More... | |
nonvirtual void | HandleThink (void) |
For physics functions only. More... | |
nonvirtual bool | IsFacing (entity) |
Returns either true or false depending on if this entity is facing the entity in question. More... | |
nonvirtual bool | IsFacingPosition (vector) |
Returns either true or false depending on if this entity is facing a position in question. More... | |
nonvirtual float | GetSpawnAge (void) |
Returns the time that's passed since the entity has been spawned. More... | |
nonvirtual float | GetSpawnTime (void) |
Returns the absolute timestamp of when the entity had been spawned. More... | |
nonvirtual void | Transport (vector, vector) |
Move the entity to a new position, with updated angles. More... | |
nonvirtual void | Relink (void) |
Relink the entity against the world. More... | |
nonvirtual vector | GetNearbySpot (void) |
Finds a free spot of an entity near itself of same size. More... | |
nonvirtual int | GetSharedID (void) |
Returns a unique id between shared entities. More... | |
virtual bool | AttackByDef (string, bool) |
Will read from the named def to perform an attack. More... | |
nonvirtual void | SetBotTag (botInfo_t) |
Sets the Info Tags tag on this entity to the desired botInfo_t tag. More... | |
nonvirtual void | EnablePlayerCollision (void) |
Will enable collision with players, which is the default. More... | |
nonvirtual void | DisablePlayerCollision (void) |
Will disable collision with player entities. More... | |
nonvirtual bool | HeldByPlayer (void) |
Returns whether this entity is being held in the hands of a player. More... | |
nonvirtual bool | IsBrush (void) |
Returns whether this entity is a brush or using a sub-model of the level. More... | |
void ncEntity::ncEntity | ( | void | ) |
The constructor.
Not much may be known of what the entity will be just yet.
void ncEntity::AddAngularVelocity | ( | vector | addVel | ) |
Adds onto the existing angular velocity.
void ncEntity::AddEffects | ( | __int32 | fl | ) |
Appends one or more effects to the entity.
Check the effects_t enum for available effects.
void ncEntity::AddFlags | ( | float | fl | ) |
Adds one or more engine specific flags to the entity.
void ncEntity::AddVelocity | ( | vector | addVel | ) |
Adds onto the existing velocity.
void ncEntity::AddVFlags | ( | float | fl | ) |
Adds one or more nuclide specific flags to the entity.
|
virtual |
Will read from the named def to perform an attack.
|
virtual |
Returns if this entity can spawned from the map file.
clientSide | If it's being spawned on the client-side. |
Reimplemented in ncInteractiveSurface, env_cubemap, env_particle, env_soundscape, env_sun, func_dustcloud, func_dustmotes, func_smokevolume, infodecal, light_environment, point_message, prop_static, sky_camera, func_lod, and info_notnull.
nonvirtual void ncEntity::ClearAngles | ( | void | ) |
Unsets any any angle related values within the entity.
nonvirtual void ncEntity::ClearParent | ( | void | ) |
Call this on an entity to remove the connection to its parent.
void ncEntity::ClearVelocity | ( | void | ) |
When called, will clear anything related to physical movement on the entity.
bool ncEntity::CreatedByMap | ( | void | ) |
Returns if the entity was spawned by the map we're on.
|
virtual |
Reimplemented in light, path_track, scripted_sequence, ambient_generic, ncActor, ncPointTrigger, and ncSoundScape.
void ncEntity::DisablePlayerCollision | ( | void | ) |
Will disable collision with player entities.
void ncEntity::Disappear | ( | void | ) |
When called it'll make the entity uninteractable (but not destroy it).
It will hide it, as well as remove any collision associated with it.
float ncEntity::DistanceFromYaw | ( | vector | targetPos | ) |
Returns a normalized value of how far away the target is from the entity's view direction.
1 means dead-center. -1 means it's behind.
bool ncEntity::DropToFloor | ( | void | ) |
When called, will drop the entity down onto the surface it's hovering over.
Will return false
if the entity fell through the floor, or something else that's undesirable.
void ncEntity::EnablePlayerCollision | ( | void | ) |
Will enable collision with players, which is the default.
float ncEntity::EntIndex | ( | void | ) |
Returns the unique entity id of the entity.
|
virtual |
Run each tic after physics are run to determine if we need to send updates over the network.
Reimplemented in func_tracktrain, ambient_generic, env_beam, env_bubbles, env_cascade_light, env_fire, env_fog, env_fog_controller, env_funnel, env_glow, env_instructor_hint, env_laser, env_projectedtexture, env_smoker, env_sprite, func_conveyor, func_monitor, func_tankmortar, func_vehicle, info_particle_system, info_waypoint, light_dynamic, phys_rope, point_spotlight, prop_rope, prop_vehicle_driveable, speaker, trigger_camera, trigger_push, ncPlayer, ncSpectator, ncItem, ncMonster, ncPhysicsEntity, ncProjectile, ncRagdoll, ncRenderableEntity, ncSound, ncSoundScape, ncSurfacePropEntity, ncVehicle, ncWeapon, and ncPMoveVars.
void ncEntity::Event_SpawnDefRelative | ( | string | classDef, |
float | xOfs, | ||
float | yOfs, | ||
float | zOfs | ||
) |
nonvirtual void ncEntity::ForceNetworkUpdate | ( | void | ) |
Forces the entity to re-network updates to all clients.
vector ncEntity::GetAbsoluteMaxs | ( | void | ) |
Returns the absolute bounding box maxs of the entity, instead of being relative to the world position.
vector ncEntity::GetAbsoluteMins | ( | void | ) |
Returns the absolute bounding box mins of the entity, instead of being relative to the world position.
vector ncEntity::GetAngles | ( | void | ) |
Returns the direction the entity is facing in euler angles.
vector ncEntity::GetAngularVelocity | ( | void | ) |
Returns the direction the entity is spinning in degrees per second for each axis.
__int32 ncEntity::GetEffects | ( | void | ) |
Returns a bitfield of the active effects running on the entity.
vector ncEntity::GetEyePos | ( | void | ) |
Returns the absolute world position of where the eyes are located.
float ncEntity::GetFlags | ( | void | ) |
Returns an engine flags bitfield that the entity associates with.
vector ncEntity::GetForward | ( | void | ) |
Returns a normalized forward vector of the entity to more easily test which way it's facing.
float ncEntity::GetFrame | ( | void | ) |
Returns the currently active framegroup of the entity.
float ncEntity::GetGravity | ( | void | ) |
Returns the gravity modifier of the entity.
entity ncEntity::GetGroundEntity | ( | void | ) |
Returns the entity we're standing on.
If the result is __NULL__
that does not mean that we're in air. Check ncEntity::IsOnGround()
for that information.
vector ncEntity::GetMaxs | ( | void | ) |
Returns the bounding box maxs of the entity.
vector ncEntity::GetMins | ( | void | ) |
Returns the bounding box mins of the entity.
string ncEntity::GetModel | ( | void | ) |
Returns the name of the 3D model representation of the entity.
float ncEntity::GetModelindex | ( | void | ) |
Returns the model id of the 3D model representation of the entity.
float ncEntity::GetMovetype | ( | void | ) |
Returns the movement type of the entity.
vector ncEntity::GetNearbySpot | ( | void | ) |
Finds a free spot of an entity near itself of same size.
Extra padding as argument.
vector ncEntity::GetOrigin | ( | void | ) |
Returns the absolute world position of the entity.
entity ncEntity::GetOwner | ( | void | ) |
Returns the owner of the entity.
nonvirtual entity ncEntity::GetParent | ( | void | ) |
Returns the entity this is parented to.
May be NULL when we have no parent.
vector ncEntity::GetRealMaxs | ( | void | ) |
Returns the actual bounding box maxs of the entity, before having been affected by scale modifiers.
vector ncEntity::GetRealMins | ( | void | ) |
Returns the actual bounding box mins of the entity, before having been affected by scale modifiers.
vector ncEntity::GetRight | ( | void | ) |
Returns a normalized right vector of the entity to more easily test what's right next to it.
float ncEntity::GetScale | ( | void | ) |
Returns the scale modifier of the entity.
int ncEntity::GetSharedID | ( | void | ) |
Returns a unique id between shared entities.
vector ncEntity::GetSize | ( | void | ) |
Returns the virtual size of the entity.
float ncEntity::GetSkin | ( | void | ) |
Returns the currently equipped skin of the entity.
float ncEntity::GetSolid | ( | void | ) |
Returns the collision type of the entity.
float ncEntity::GetSpawnAge | ( | void | ) |
Returns the time that's passed since the entity has been spawned.
float ncEntity::GetSpawnTime | ( | void | ) |
Returns the absolute timestamp of when the entity had been spawned.
vector ncEntity::GetUp | ( | void | ) |
Returns a normalized up vector of the entity to more easily test what may be above it.
vector ncEntity::GetVelocity | ( | void | ) |
Returns the movement velocity of the entity.
float ncEntity::GetVFlags | ( | void | ) |
Returns a nuclide flags bitfield that the entity associates with.
vector ncEntity::GetViewAngle | ( | void | ) |
Returns an euler angle of where the entity is 'looking' at.
These are not necessarily eye values.
void ncEntity::HandleThink | ( | void | ) |
For physics functions only.
Call this inside your customphysics function of any entity class that you want to support think functions in. This saves you the effort of writing your own routines and methods.
bool ncEntity::HasFlags | ( | float | bits | ) |
Returns true if the entity has the specified engine flags.
bool ncEntity::HasModel | ( | void | ) |
Returns if this entity has a model set.
bool ncEntity::HasSpawnFlags | ( | float | sf | ) |
Returns if the entity has any spawnflags set.
bool ncEntity::HasVFlags | ( | float | bits | ) |
Returns true if the entity has the specified, nuclide specific, flags.
bool ncEntity::HeldByPlayer | ( | void | ) |
Returns whether this entity is being held in the hands of a player.
As in via ncPlayer::PickupEntity().
void ncEntity::Hide | ( | void | ) |
When called, the entity will stop being rendered on the client.
|
virtual |
Called when we are being prompted by another object/function with an input message.
Reimplemented from ncTrigger.
Reimplemented in env_explosion, env_fade, env_physexplosion, env_shake, env_shooter, env_spark, func_areaportal, func_door, func_door_rotating, func_guntarget, func_plat, func_tracktrain, func_wall_toggle, game_team_master, game_text, light, logic_case, logic_relay, logic_timer, path_track, phys_convert, phys_hinge, phys_keepupright, phys_slideconstraint, point_camera, point_servercommand, point_trigger, prop_portal, scripted_sentence, trigger_changelevel, trigger_hurt, trigger_multiple, trigger_once, ambient_generic, env_beam, env_bubbles, env_cascade_light, env_fog_controller, env_funnel, env_instructor_hint, env_muzzleflash, env_projectedtexture, env_smoker, env_sprite, func_conveyor, func_monitor, info_particle_system, info_waypoint, light_dynamic, logic_achievement, point_spotlight, trigger_camera, ncPlayer, ncItem, ncMonster, ncActor, ncPhysicsConstraint, ncRenderableEntity, ncSoundScape, and ncSurfacePropEntity.
bool ncEntity::IntersectsWith | ( | entity | check | ) |
Returns whether or not the given entity insersects with us.
Like a more lenient WithinBounds().
bool ncEntity::IsBrush | ( | void | ) |
Returns whether this entity is a brush or using a sub-model of the level.
bool ncEntity::IsFacing | ( | entity | target | ) |
Returns either true or false depending on if this entity is facing the entity in question.
bool ncEntity::IsFacingPosition | ( | vector | targetPos | ) |
Returns either true or false depending on if this entity is facing a position in question.
bool ncEntity::IsHidden | ( | void | ) |
Returns if the entity is currently being hidden explicitly.
bool ncEntity::IsOnGround | ( | void | ) |
Returns if the entity is aligned to the ground.
bool ncEntity::IsSolid | ( | void | ) |
Returns if the entity is solid or non-solid.
|
virtual |
Tells the engine to make the entity static, effectively making it inaccessible.
It will be removed from the game-logic but remain visible and it will retain its collision and maintain the appearance it had before getting removed.
Reimplemented in ncRenderableEntity.
vector ncEntity::NearestWallPointForRadius | ( | float | radius | ) |
Returns the nearest point on a wall of this entity within a specified radius.
If there is nothing nearby, it'll return the position of the entity.
|
virtual |
Called when we need to re-align the entity to our parent entity.
Reimplemented from ncIO.
Reimplemented in ncSurfacePropEntity.
|
virtual |
Client: Run after the rendering of 3D world is complete.
2D calls can happen here.
Reimplemented in ncInteractiveSurface, env_sun, env_glow, env_instructor_hint, info_waypoint, ncPlayer, ncPhysicsEntity, ncProjectile, and ncRenderableEntity.
|
virtual |
Reimplemented in ncInteractiveSurface, env_sun, func_dustcloud, func_dustmotes, func_smokevolume, infodecal, ambient_generic, env_beam, env_funnel, env_glow, env_laser, env_muzzleflash, env_projectedtexture, env_shockwave, env_smoker, env_sprite, func_lod, light_dynamic, phys_rope, point_spotlight, prop_rope, ncClient, ncPlayer, ncSpectator, ncMonster, ncProjectile, ncRagdoll, ncRenderableEntity, ncSpraylogo, ncSurfacePropEntity, and ncTalkMonster.
|
virtual |
Client: Handles network updates from the server for the associated entity.
Reimplemented in func_tracktrain, ambient_generic, env_beam, env_bubbles, env_cascade_light, env_fire, env_fog, env_fog_controller, env_funnel, env_glow, env_instructor_hint, env_laser, env_projectedtexture, env_smoker, env_sprite, func_conveyor, func_monitor, func_tankmortar, func_vehicle, info_particle_system, info_waypoint, light_dynamic, phys_rope, point_spotlight, prop_rope, prop_vehicle_driveable, speaker, trigger_camera, trigger_push, ncPlayer, ncSpectator, ncItem, ncMonster, ncPhysicsEntity, ncProjectile, ncRagdoll, ncRenderableEntity, ncSound, ncSoundScape, ncSurfacePropEntity, ncTalkMonster, ncVehicle, ncWeapon, and ncPMoveVars.
void ncEntity::Relink | ( | void | ) |
Relink the entity against the world.
Updates PVS info etc.
void ncEntity::RemoveEffects | ( | __int32 | fl | ) |
Removes one or more effects from the entity.
Check the effects_t enum for available effects.
void ncEntity::RemoveFlags | ( | float | fl | ) |
Remove one or more engine specific flags from the entity.
void ncEntity::RemoveVFlags | ( | float | fl | ) |
Remove one or more nuclide specific flags from the entity.
|
virtual |
Client: Called when video resources need to be allocated or reloaded for the entity.
Reimplemented in ncRenderableEntity, ncInteractiveSurface, env_sun, env_beam, env_cascade_light, env_fog_controller, env_funnel, env_glow, env_laser, light_dynamic, point_spotlight, and ncSpraylogo.
|
virtual |
Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state.
Reimplemented from ncTrigger.
Reimplemented in env_particle, env_soundscape, light_environment, prop_static, button_target, cycler, env_explosion, env_message, env_model, env_shooter, env_spark, func_breakable, func_brush, func_button, func_door, func_door_rotating, func_guntarget, func_healthcharger, func_monsterclip, func_mortar_field, func_pendulum, func_physbox, func_plat, func_platrot, func_pushable, func_recharge, func_rot_button, func_rotating, func_tank, func_tracktrain, func_train, func_traincontrols, func_wall_toggle, game_counter, game_counter_set, game_zone_player, info_node, info_node_air, infodecal, item_eyescanner, item_food, item_generic, item_healthcharger, item_recharge, light, logic_auto, logic_case, logic_relay, logic_timer, momentary_door, momentary_rot_button, monster_furniture, monster_generic, monstermaker, multi_manager, multisource, path_corner, path_track, phys_ballsocket, phys_constraint, phys_constraintsystem, phys_convert, phys_hinge, phys_keepupright, phys_slideconstraint, point_camera, point_trigger, prop_door_rotating, prop_dynamic, prop_physics, prop_portal, prop_static, random_speaker, random_trigger, reserved_spot, scripted_sequence, targ_speaker, target_cdaudio, target_speaker, trigger_auto, trigger_autosave, trigger_cdaudio, trigger_changelevel, trigger_counter, trigger_endsection, trigger_hurt, trigger_look, trigger_monsterjump, trigger_once, trigger_playerfreeze, trigger_relay, trigger_teleport, trigger_transition, ambient_generic, env_beam, env_bubbles, env_cascade_light, env_fire, env_fog, env_fog_controller, env_funnel, env_glow, env_instructor_hint, env_laser, env_projectedtexture, env_smoker, env_sprite, func_conveyor, func_friction, func_illusionary, func_ladder, func_lod, func_monitor, func_tankmortar, func_useableladder, func_vehicle, func_wall, info_particle_system, light_dynamic, logic_achievement, phys_rope, point_spotlight, prop_rope, prop_vehicle_driveable, speaker, trigger_camera, trigger_gravity, trigger_push, ncOutput, ncBrushTrigger, ncCharger, ncPlayer, ncItem, ncMonster, ncPhysicsEntity, ncPointTrigger, ncRenderableEntity, ncSound, ncSpawnPoint, ncSurfacePropEntity, and ncTalkMonster.
|
virtual |
Similar to ncIO::SpawnKey() but for save-game fields.
Whatever you write into file handles within your ncIO::Save()
method needs to be read back in here.
Reimplemented from ncTrigger.
Reimplemented in env_beverage, env_explosion, env_fade, env_global, env_hudhint, env_message, env_physexplosion, env_shake, env_shooter, env_spark, func_areaportal, func_breakable, func_brush, func_button, func_door, func_door_rotating, func_guntarget, func_healthcharger, func_mortar_field, func_pendulum, func_plat, func_platrot, func_pushable, func_recharge, func_rot_button, func_rotating, func_tank, func_trackchange, func_tracktrain, func_train, func_wall_toggle, game_counter, game_counter_set, game_player_equip, game_player_hurt, game_score, game_team_master, game_text, game_zone_player, info_hint, infodecal, item_food, item_generic, item_healthcharger, item_recharge, light, logic_auto, logic_case, logic_timer, momentary_rot_button, ncMomentary, monstermaker, multi_manager, path_corner, path_track, phys_convert, phys_hinge, phys_keepupright, phys_slideconstraint, player_loadsaved, point_camera, point_trigger, prop_door_rotating, random_speaker, random_trigger, scripted_sentence, scripted_sequence, targ_speaker, target_cdaudio, trigger_auto, trigger_autosave, trigger_cdaudio, trigger_changelevel, trigger_changetarget, trigger_counter, trigger_hurt, trigger_look, trigger_monsterjump, trigger_multiple, trigger_once, trigger_relay, trigger_teleport, ambient_generic, env_bubbles, env_cascade_light, env_fog, env_fog_controller, env_funnel, env_instructor_hint, env_muzzleflash, env_smoker, func_conveyor, func_vehicle, info_waypoint, logic_achievement, phys_rope, prop_rope, speaker, trigger_camera, trigger_gravity, trigger_push, NSWorldspawn, ncAttack, ncCharger, ncClient, ncPlayer, ncSpectator, ncItem, ncMonster, ncMoverEntity, ncActor, ncPhysicsConstraint, ncPhysicsEntity, ncPointTrigger, ncProjectile, ncRenderableEntity, ncSoundScape, ncSquadMonster, ncSurfacePropEntity, ncTalkMonster, ncTimer, ncVehicle, and ncWeapon.
nonvirtual void ncEntity::RestoreAngles | ( | void | ) |
Restore the entity's angles to the value the spawndata contains.
|
virtual |
Handles saving a copy of this entity to a given filehandle.
Within you want to use the ncIO::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.
Reimplemented from ncTrigger.
Reimplemented in env_beverage, env_explosion, env_fade, env_global, env_hudhint, env_message, env_physexplosion, env_shake, env_shooter, env_spark, func_areaportal, func_breakable, func_brush, func_button, func_door, func_door_rotating, func_guntarget, func_healthcharger, func_mortar_field, func_pendulum, func_plat, func_platrot, func_pushable, func_recharge, func_rot_button, func_rotating, func_tank, func_trackchange, func_tracktrain, func_train, func_wall_toggle, game_counter, game_counter_set, game_player_equip, game_player_hurt, game_score, game_team_master, game_text, game_zone_player, info_hint, infodecal, item_food, item_generic, item_healthcharger, item_recharge, light, logic_auto, logic_case, logic_timer, momentary_rot_button, ncMomentary, monstermaker, multi_manager, path_corner, path_track, phys_convert, phys_hinge, phys_keepupright, phys_slideconstraint, player_loadsaved, point_camera, point_trigger, prop_door_rotating, random_speaker, random_trigger, scripted_sentence, scripted_sequence, targ_speaker, target_cdaudio, trigger_auto, trigger_autosave, trigger_cdaudio, trigger_changelevel, trigger_changetarget, trigger_counter, trigger_hurt, trigger_look, trigger_monsterjump, trigger_multiple, trigger_once, trigger_relay, trigger_teleport, ambient_generic, env_bubbles, env_cascade_light, env_fog, env_fog_controller, env_funnel, env_instructor_hint, env_muzzleflash, env_smoker, func_conveyor, func_vehicle, info_waypoint, logic_achievement, phys_rope, prop_rope, speaker, trigger_camera, trigger_gravity, trigger_push, NSWorldspawn, ncAttack, ncCharger, ncClient, ncPlayer, ncSpectator, ncItem, ncMonster, ncMoverEntity, ncActor, ncPhysicsConstraint, ncPhysicsEntity, ncPointTrigger, ncProjectile, ncRenderableEntity, ncSoundScape, ncSquadMonster, ncSurfacePropEntity, ncTalkMonster, ncTimer, ncVehicle, and ncWeapon.
|
virtual |
Called by the engine whenever we need to send a client an update about this entity.
Reimplemented in func_tracktrain, ambient_generic, env_beam, env_bubbles, env_cascade_light, env_fire, env_fog, env_fog_controller, env_funnel, env_glow, env_instructor_hint, env_laser, env_projectedtexture, env_smoker, env_sprite, func_conveyor, func_lod, func_monitor, func_tankmortar, func_vehicle, info_particle_system, info_waypoint, light_dynamic, phys_rope, point_spotlight, prop_rope, prop_vehicle_driveable, speaker, trigger_camera, trigger_push, ncPlayer, ncSpectator, ncItem, ncMonster, ncPhysicsEntity, ncProjectile, ncRagdoll, ncRenderableEntity, ncSound, ncSoundScape, ncSurfacePropEntity, ncTalkMonster, ncVehicle, ncWeapon, and ncPMoveVars.
void ncEntity::SetAngles | ( | vector | newAngles | ) |
Sets the direction the entity is facing in eueler angles.
void ncEntity::SetAngularVelocity | ( | vector | newAvel | ) |
Sets the angular velocity of the entity in degrees per second on each axis.
void ncEntity::SetBotTag | ( | botInfo_t | newTag | ) |
Sets the Info Tags tag on this entity to the desired botInfo_t tag.
void ncEntity::SetEffects | ( | __int32 | newEffects | ) |
Sets the whole effects field.
Check the effects_t enum for available effects.
void ncEntity::SetEyePos | ( | vector | value | ) |
Sets the relative position of the eyes.
void ncEntity::SetFrame | ( | float | newFrame | ) |
Sets the framegroup sequence of the entity.
Must be positive.
void ncEntity::SetGravity | ( | float | newGrav | ) |
Sets the gravitational modifier of the entity.
The default is 1.0.
|
virtual |
Sets the 3D model representation of the entity from a file path and name.
Reimplemented in ncPhysicsEntity, and ncSurfacePropEntity.
void ncEntity::SetModelindex | ( | float | newModelIndex | ) |
Sets the 3D model representation of the entity from an already precached resource id.
void ncEntity::SetMovetype | ( | float | newMovetype | ) |
Sets the movement type of the entity.
Check the movetype_t enum for available types.
void ncEntity::SetOrigin | ( | vector | newOrigin | ) |
Sets the absolute 3D world position of the entity.
void ncEntity::SetOriginUnstick | ( | vector | newOrigin | ) |
Same as SetOrigin(), but will push the entity out the ground if needed.
void ncEntity::SetOwner | ( | entity | newOwner | ) |
Sets the owner of the entity.
Entities will no longer collide with the specified owner.
nonvirtual void ncEntity::SetParent | ( | string | ) |
Call this to parent the entity to another entity.
nonvirtual void ncEntity::SetParentAttachment | ( | string | ) |
Call this to parent the entity to an attachment of another entity.
void ncEntity::SetScale | ( | float | newScale | ) |
Sets the scale of the entity.
Affects collision as well.
void ncEntity::SetSendFlags | ( | float | flSendFlags | ) |
Overrides the field that's used to determine which information should be networked.
void ncEntity::SetSize | ( | vector | newMins, |
vector | newMaxs | ||
) |
Sets the bounding box size of the entity.
This affects both collision and rendering bounds checking.
void ncEntity::SetSkin | ( | float | newSkin | ) |
Sets the skingroup of the entity.
Must be positive.
void ncEntity::SetSolid | ( | float | newSolid | ) |
Sets the collision type of the entity.
Check the solid_t enum for available types.
void ncEntity::SetTouch | ( | void() | newTouch | ) |
Overrides the touch function of a the entity to the specified function.
As a result Start/EndTouch will be unreliable.
void ncEntity::SetVelocity | ( | vector | vecNew | ) |
Sets the movement velocity of the given entity.
nonvirtual bool ncEntity::SharesPVSWithPlayer | ( | void | ) |
void ncEntity::Show | ( | void | ) |
When called, will unhide the entity.
void ncEntity::Spawn | ( | void | ) |
|
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 ncIO.
Reimplemented in ncInteractiveSurface, env_sun, func_dustcloud, func_dustmotes, func_smokevolume, infodecal, prop_static, cycler_wreckage, env_beverage, env_explosion, env_global, env_shooter, env_spark, func_areaportal, func_breakable, func_button, func_door, func_door_rotating, func_guntarget, func_healthcharger, func_plat, func_pushable, func_recharge, func_tank, func_trackchange, func_tracktrain, func_train, info_hint, infodecal, item_healthcharger, item_recharge, light, light_environment, logic_auto, logic_case, logic_timer, multi_manager, path_corner, phys_convert, point_trigger, scripted_sentence, trigger_autosave, trigger_changelevel, trigger_hurt, trigger_look, trigger_multiple, trigger_once, trigger_teleport, ambient_generic, env_bubbles, env_fog, env_sprite, func_lod, func_tankmortar, func_vehicle, logic_achievement, prop_vehicle_driveable, speaker, NSWorldspawn, ncAttack, ncCharger, ncPlayer, ncItem, ncMonster, ncActor, ncPhysicsConstraint, ncPhysicsEntity, ncProjectile, ncSound, ncSquadMonster, ncSurfacePropEntity, and ncWeapon.
|
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 ncIO.
Reimplemented from ncTrigger.
Reimplemented in ncInteractiveSurface, env_cubemap, env_particle, env_soundscape, env_sun, func_dustcloud, func_dustmotes, func_smokevolume, infodecal, light_environment, point_message, prop_static, sky_camera, env_beverage, env_explosion, env_fade, env_global, env_hudhint, env_message, env_model, env_physexplosion, env_shake, env_shooter, env_sound, env_spark, func_areaportal, func_breakable, func_brush, func_button, func_door, func_door_rotating, func_guntarget, func_healthcharger, func_mortar_field, func_pendulum, func_physbox, func_plat, func_platrot, func_pushable, func_recharge, func_rot_button, func_rotating, func_tank, func_trackchange, func_tracktrain, func_train, game_counter, game_counter_set, game_player_equip, game_player_hurt, game_score, game_team_master, game_text, game_zone_player, info_hint, infodecal, item_eyescanner, item_generic, item_healthcharger, item_recharge, light, light_environment, logic_auto, logic_case, logic_relay, logic_timer, momentary_door, momentary_rot_button, monster_furniture, monstermaker, multi_manager, path_corner, path_track, phys_convert, phys_hinge, phys_keepupright, phys_slideconstraint, player_loadsaved, point_camera, point_trigger, prop_door_rotating, prop_dynamic, prop_physics, prop_portal, random_speaker, random_trigger, scripted_sentence, scripted_sequence, targ_speaker, target_cdaudio, target_speaker, trigger_auto, trigger_cdaudio, trigger_changelevel, trigger_changetarget, trigger_counter, trigger_hurt, trigger_look, trigger_monsterjump, trigger_multiple, trigger_once, trigger_relay, trigger_teleport, ambient_generic, env_beam, env_bubbles, env_cascade_light, env_fire, env_fog, env_fog_controller, env_funnel, env_glow, env_instructor_hint, env_laser, env_muzzleflash, env_projectedtexture, env_shockwave, env_smoker, env_sprite, func_conveyor, func_friction, func_lod, func_monitor, func_tankmortar, func_useableladder, func_vehicle, info_particle_system, info_waypoint, light_dynamic, logic_achievement, phys_rope, point_spotlight, prop_rope, speaker, trigger_camera, trigger_gravity, trigger_push, NSWorldspawn, ncAttack, ncCharger, ncItem, ncMonster, ncMoverEntity, ncActor, ncPhysicsConstraint, ncPhysicsEntity, ncPointTrigger, ncProjectile, ncRenderableEntity, ncSoundScape, ncSquadMonster, ncSurfacePropEntity, ncTalkMonster, and ncWeapon.
bool ncEntity::StartSound | ( | string | strSample, |
float | channel, | ||
float | flags, | ||
bool | broadcast | ||
) |
Plays a sound sample directly onto the entity.
Returns FALSE
if the sample was not found.
bool ncEntity::StartSoundDef | ( | string | strSample, |
float | channel, | ||
bool | broadcast | ||
) |
Plays a soundDef on the entity.
Returns FALSE
if the soundDef was not found.
void ncEntity::StopSound | ( | float | channel, |
bool | broadcast | ||
) |
Stops a sound sample or soundDef that is playing on the given channel.
void ncEntity::Transport | ( | vector | new_pos, |
vector | new_ang | ||
) |
Move the entity to a new position, with updated angles.
void ncEntity::TurnTo | ( | float | targetAngle | ) |
Turns to the specified angle.
void ncEntity::TurnToPos | ( | vector | targetPos | ) |
Turns towards the specified position.
void ncEntity::UpdateBounds | ( | void | ) |
Call this if you want to update bounding boxes to take angles into account.
nonvirtual void ncEntity::UseBy | ( | entity | ) |
Simulates the press of the use/activate key, with the passed entity being the activator.
bool ncEntity::Visible | ( | entity | ent | ) |
Returns if the entity is visible by another entity and a field of view of 90 degrees.
bool ncEntity::VisibleVec | ( | vector | org | ) |
Returns if the entity is visible from a given position and a field of view of 90 degrees.
float ncEntity::WaterLevel | ( | void | ) |
Returns the water level the entity is in.
0 - Entity is not in any water/liquid.
1 - Entity 1/4 submerged.
2 - Entity 3/4 submerged.
3 - Entity is fully submerged
bool ncEntity::WithinBounds | ( | entity | check | ) |
Returns whether or not we are fully within the bounds of a given entity.
vector ncEntity::WorldSpaceCenter | ( | void | ) |
Returns absolute world coordinates of the center of the entity according to its pivot point.