24 BASEFL_CHANGED_MODELINDEX,
25 BASEFL_CHANGED_ORIGIN_X,
26 BASEFL_CHANGED_ORIGIN_Y,
27 BASEFL_CHANGED_ORIGIN_Z,
28 BASEFL_CHANGED_ANGLES_X,
29 BASEFL_CHANGED_ANGLES_Y,
30 BASEFL_CHANGED_ANGLES_Z,
31 BASEFL_CHANGED_VELOCITY_X,
32 BASEFL_CHANGED_VELOCITY_Y,
33 BASEFL_CHANGED_VELOCITY_Z,
34 BASEFL_CHANGED_ANGULARVELOCITY,
40 BASEFL_CHANGED_MOVETYPE,
41 BASEFL_CHANGED_EFFECTS,
97 virtual void SpawnKey(
string,
string);
100 nonvirtual
void Spawn(
void);
109 virtual bool CanSpawn(
bool clientSide);
116 virtual void Input(entity,
string,
string);
117 virtual void Save(
float);
118 virtual void Restore(
string,
string);
170 nonvirtual
void SetSkin(
float);
206 nonvirtual
void SetSize(vector,vector);
217 nonvirtual
void TurnTo(
float);
227 nonvirtual
float GetSkin(
void);
251 nonvirtual vector
GetSize(
void);
253 nonvirtual vector
GetMins(
void);
255 nonvirtual vector
GetMaxs(
void);
290 nonvirtual
void Show(
void);
292 nonvirtual
void Hide(
void);
314 virtual vector
GetUp(
void);
329 nonvirtual
bool Visible(entity);
354 nonvirtual
bool StartSound(
string,
float,
float,
bool);
382 nonvirtual
void Transport(vector, vector);
404 nonvirtual
bool _ProjectileAttack(
string,
bool, vector, vector);
407 nonvirtual vector GetModelMins(
void);
408 nonvirtual vector GetModelMaxs(
void);
409 nonvirtual
void _RelinkToSpawnParent(
void);
411 nonvirtual
void _ModelChanged(
void);
413 NETWORKED_INT(entityDefID)
415 NETWORKED_VECTOR_N(origin)
416 NETWORKED_VECTOR_N(angles)
417 NETWORKED_FLOAT_N(modelindex)
418 NETWORKED_VECTOR_N(size)
419 NETWORKED_VECTOR_N(mins)
420 NETWORKED_VECTOR_N(maxs)
421 NETWORKED_FLOAT_N(solid)
422 NETWORKED_FLOAT_N(movetype)
423 NETWORKED_FLOAT_N(scale)
424 NETWORKED_FLOAT_N(
flags)
425 NETWORKED_FLOAT_N(m_nuclideFlags)
426 NETWORKED_VECTOR_N(velocity)
427 NETWORKED_VECTOR_N(avelocity)
428 NETWORKED_FLOAT_N(frame)
429 NETWORKED_FLOAT_N(skin)
432 entity m_holdingPlayer;
433 float m_lastHeldTime;
435 vector m_internalMins;
436 vector m_internalMaxs;
437 bool m_modelBrushBased;
438 vector m_editorColor;
446 string m_parent_attachment;
447 vector m_parentPosOffs;
448 vector m_parentAngOffs;
454ncEntity spawnClass(
string className, vector desiredPos);
457bool changeClass(entity target,
string className)
460void sendInput(entity target,
string inputName,
string dataString, entity activator);
ncEntity is the lowest of the user-accessible entity class.
Definition Entity.h:75
nonvirtual entity GetOwner(void)
Returns the owner of the entity.
Definition Entity.qc:842
nonvirtual vector GetMaxs(void)
Returns the bounding box maxs of the entity.
Definition Entity.qc:911
nonvirtual float GetSpawnTime(void)
Returns the absolute timestamp of when the entity had been spawned.
Definition Entity.qc:1866
nonvirtual float GetFlags(void)
Returns an engine flags bitfield that the entity associates with.
Definition Entity.qc:941
nonvirtual void Show(void)
When called, will unhide the entity.
Definition Entity.qc:1716
nonvirtual vector NearestWallPointForRadius(float)
Returns the nearest point on a wall of this entity within a specified radius.
Definition Entity.qc:1826
nonvirtual float GetVFlags(void)
Returns a nuclide flags bitfield that the entity associates with.
Definition Entity.qc:947
nonvirtual __int32 GetEffects(void)
Returns a bitfield of the active effects running on the entity.
Definition Entity.qc:822
nonvirtual void SetEffects(__int32)
Sets the whole effects field.
Definition Entity.qc:522
virtual void SetAngles(vector)
Sets the direction the entity is facing in eueler angles.
Definition Entity.qc:698
nonvirtual vector GetRealMins(void)
Returns the actual bounding box mins of the entity, before having been affected by scale modifiers.
Definition Entity.qc:917
virtual void SpawnKey(string, string)
This method handles entity key/value pairs on map load.
Definition Entity.qc:1655
nonvirtual vector GetMins(void)
Returns the bounding box mins of the entity.
Definition Entity.qc:905
nonvirtual bool Loading(void)
Returns if the entity is still being loaded from the map data.
Definition Entity.qc:203
nonvirtual void Hide(void)
When called, the entity will stop being rendered on the client.
Definition Entity.qc:1722
nonvirtual void SetMovetype(float)
Sets the movement type of the entity.
Definition Entity.qc:596
nonvirtual float HasFlags(float)
Returns true if the entity has the specified engine flags.
Definition Entity.qc:953
virtual void postdraw(void)
Client: Run after the rendering of 3D world is complete.
Definition Entity.qc:287
nonvirtual vector GetAbsoluteMaxs(void)
Returns the absolute bounding box maxs of the entity, instead of being relative to the world position...
Definition Entity.qc:935
nonvirtual void Event_SpawnDefCenter(string)
Definition Entity.qc:1471
nonvirtual void AddFlags(float)
Adds one or more engine specific flags to the entity.
Definition Entity.qc:791
nonvirtual void RemoveFlags(float)
Remove one or more engine specific flags from the entity.
Definition Entity.qc:796
virtual void ReceiveEvent(float)
Definition Entity.qc:278
nonvirtual float HasVFlags(float)
Returns true if the entity has the specified, nuclide specific, flags.
Definition Entity.qc:959
nonvirtual void SetSkin(float)
Sets the skingroup of the entity.
Definition Entity.qc:572
nonvirtual void TurnTo(float)
Turns to the specified angle.
Definition Entity.qc:812
nonvirtual bool IsFacing(entity)
Returns either true or false depending on if this entity is facing the entity in question.
Definition Entity.qc:1846
nonvirtual float GetGravity(void)
Returns the gravity modifier of the entity.
Definition Entity.qc:875
virtual void Respawn(void)
Server: Called when the entity first spawns or when game-logic requests the entity to return to its o...
Definition Entity.qc:1002
nonvirtual string GetModel(void)
Returns the name of the 3D model representation of the entity.
Definition Entity.qc:857
virtual void Precache(void)
Definition Entity.qc:62
nonvirtual bool SharesPVSWithPlayer(void)
nonvirtual bool HeldByPlayer(void)
Returns whether this entity is being held in the hands of a player.
Definition Entity.qc:209
nonvirtual bool IntersectsWith(entity)
Returns whether or not the given entity insersects with us.
Definition Entity.qc:1766
nonvirtual bool Visible(entity)
Returns if the entity is visible by another entity and a field of view of 90 degrees.
Definition Entity.qc:150
nonvirtual entity GetParent(void)
Returns the entity this is parented to.
nonvirtual int GetSharedID(void)
Returns a unique id between shared entities.
Definition Entity.qc:2010
nonvirtual bool VisibleVec(vector)
Returns if the entity is visible from a given position and a field of view of 90 degrees.
Definition Entity.qc:130
virtual void SetOrigin(vector)
Sets the absolute 3D world position of the entity.
Definition Entity.qc:726
nonvirtual void Spawn(void)
Definition Entity.qc:43
nonvirtual float GetSkin(void)
Returns the currently equipped skin of the entity.
Definition Entity.qc:832
nonvirtual void RemoveVFlags(float)
Remove one or more nuclide specific flags from the entity.
Definition Entity.qc:807
nonvirtual void SetModelindex(float)
Sets the 3D model representation of the entity from an already precached resource id.
Definition Entity.qc:757
void ncEntity(void)
The constructor.
Definition Entity.qc:29
nonvirtual void StopSound(float, bool)
Stops a sound sample or soundDef that is playing on the given channel.
Definition Entity.qc:1810
nonvirtual void UpdateBounds(void)
Call this if you want to update bounding boxes to take angles into account.
Definition Entity.qc:651
virtual vector GetAngles(void)
Returns the direction the entity is facing in euler angles.
Definition Entity.qc:881
virtual vector GetUp(void)
Returns a normalized up vector of the entity to more easily test what may be above it.
Definition Entity.qc:112
virtual void Spawned(void)
Called when the entity is fulled initialized.
Definition Entity.qc:76
nonvirtual void RestoreAngles(void)
Restore the entity's angles to the value the spawndata contains.
nonvirtual void AddVelocity(vector)
Adds onto the existing velocity.
Definition Entity.qc:774
nonvirtual void RemoveEffects(__int32)
Removes one or more effects from the entity.
Definition Entity.qc:785
nonvirtual void SetOwner(entity)
Sets the owner of the entity.
Definition Entity.qc:578
nonvirtual bool StartSoundDef(string, float, bool)
Plays a soundDef on the entity.
Definition Entity.qc:1802
virtual void SetModel(string)
Sets the 3D model representation of the entity from a file path and name.
Definition Entity.qc:744
nonvirtual vector GetRealMaxs(void)
Returns the actual bounding box maxs of the entity, before having been affected by scale modifiers.
Definition Entity.qc:923
virtual void ReceiveEntity(float, float)
Client: Handles network updates from the server for the associated entity.
Definition Entity.qc:233
nonvirtual void ClearParent(void)
Call this on an entity to remove the connection to its parent.
nonvirtual float GetSolid(void)
Returns the collision type of the entity.
Definition Entity.qc:852
virtual vector GetVelocity(void)
Returns the movement velocity of the entity.
Definition Entity.qc:847
nonvirtual void DisablePlayerCollision(void)
Will disable collision with player entities.
Definition Entity.qc:2027
virtual void Input(entity, string, string)
Called when we are being prompted by another object/function with an input message.
Definition Entity.qc:1503
nonvirtual bool IsOnGround(void)
Returns if the entity is aligned to the ground.
Definition Entity.qc:179
nonvirtual bool IsBrush(void)
Returns whether this entity is a brush or using a sub-model of the level.
Definition Entity.qc:738
nonvirtual void AddAngularVelocity(vector)
Adds onto the existing angular velocity.
Definition Entity.qc:768
nonvirtual bool CreatedByMap(void)
Returns if the entity was spawned by the map we're on.
Definition Entity.qc:197
virtual void Save(float)
Handles saving a copy of this entity to a given filehandle.
Definition Entity.qc:1017
nonvirtual vector GetSize(void)
Returns the virtual size of the entity.
Definition Entity.qc:899
virtual void Restore(string, string)
Similar to ncIO::SpawnKey() but for save-game fields.
Definition Entity.qc:1136
nonvirtual float GetModelindex(void)
Returns the model id of the 3D model representation of the entity.
Definition Entity.qc:863
virtual void DebugDraw(void)
nonvirtual float GetScale(void)
Returns the scale modifier of the entity.
Definition Entity.qc:837
virtual vector GetOrigin(void)
Returns the absolute world position of the entity.
Definition Entity.qc:893
nonvirtual float WaterLevel(void)
Returns the water level the entity is in.
Definition Entity.qc:124
virtual void ParentUpdate(void)
Called when we need to re-align the entity to our parent entity.
nonvirtual bool IsSolid(void)
Returns if the entity is solid or non-solid.
Definition Entity.qc:185
nonvirtual void HandleThink(void)
For physics functions only.
Definition Entity.qc:1834
nonvirtual vector GetAbsoluteMins(void)
Returns the absolute bounding box mins of the entity, instead of being relative to the world position...
Definition Entity.qc:929
virtual vector GetRight(void)
Returns a normalized right vector of the entity to more easily test what's right next to it.
Definition Entity.qc:106
nonvirtual void ClearAngles(void)
Unsets any any angle related values within the entity.
nonvirtual void SetVelocity(vector)
Sets the movement velocity of the given entity.
Definition Entity.qc:584
nonvirtual void SetFrame(float)
Sets the framegroup sequence of the entity.
Definition Entity.qc:528
nonvirtual void AddVFlags(float)
Adds one or more nuclide specific flags to the entity.
Definition Entity.qc:802
nonvirtual void SetEyePos(vector)
Sets the relative position of the eyes.
Definition Entity.qc:635
nonvirtual void SetParentAttachment(string)
Call this to parent the entity to an attachment of another entity.
nonvirtual float DistanceFromYaw(vector)
Returns a normalized value of how far away the target is from the entity's view direction.
Definition Entity.qc:167
virtual void MakeStatic(void)
Tells the engine to make the entity static, effectively making it inaccessible.
Definition Entity.qc:1741
virtual vector GetAngularVelocity(void)
Returns the direction the entity is spinning in degrees per second for each axis.
Definition Entity.qc:887
nonvirtual float GetSpawnAge(void)
Returns the time that's passed since the entity has been spawned.
Definition Entity.qc:1860
nonvirtual float EntIndex(void)
Returns the unique entity id of the entity.
Definition Entity.qc:88
nonvirtual void Event_SpawnDefRelative(string, float, float, float)
Definition Entity.qc:1488
nonvirtual float GetFrame(void)
Returns the currently active framegroup of the entity.
Definition Entity.qc:827
nonvirtual void SetOriginUnstick(vector)
Same as SetOrigin(), but will push the entity out the ground if needed.
Definition Entity.qc:732
virtual float SendEntity(entity, float)
Called by the engine whenever we need to send a client an update about this entity.
virtual float predraw(void)
Definition Entity.qc:222
nonvirtual void SetGravity(float)
Sets the gravitational modifier of the entity.
Definition Entity.qc:602
nonvirtual vector GetEyePos(void)
Returns the absolute world position of where the eyes are located.
Definition Entity.qc:641
nonvirtual float GetMovetype(void)
Returns the movement type of the entity.
Definition Entity.qc:869
virtual void EvaluateEntity(void)
Run each tic after physics are run to determine if we need to send updates over the network.
nonvirtual void AddEffects(__int32)
Appends one or more effects to the entity.
Definition Entity.qc:780
nonvirtual vector GetNearbySpot(void)
Finds a free spot of an entity near itself of same size.
Definition Entity.qc:1888
nonvirtual void TurnToPos(vector)
Turns towards the specified position.
Definition Entity.qc:817
nonvirtual bool IsHidden(void)
Returns if the entity is currently being hidden explicitly.
Definition Entity.qc:1728
nonvirtual bool HasModel(void)
Returns if this entity has a model set.
Definition Entity.qc:82
virtual vector GetForward(void)
Returns a normalized forward vector of the entity to more easily test which way it's facing.
Definition Entity.qc:100
nonvirtual vector WorldSpaceCenter(void)
Returns absolute world coordinates of the center of the entity according to its pivot point.
Definition Entity.qc:118
nonvirtual bool HasSpawnFlags(float)
Returns if the entity has any spawnflags set.
Definition Entity.qc:173
nonvirtual void Disappear(void)
When called it'll make the entity uninteractable (but not destroy it).
Definition Entity.qc:1734
virtual bool CanSpawn(bool clientSide)
Returns if this entity can spawned from the map file.
Definition Entity.qc:1747
nonvirtual void SetSolid(float)
Sets the collision type of the entity.
Definition Entity.qc:608
virtual bool AttackByDef(string, bool)
Will read from the named def to perform an attack.
Definition Entity.qc:1996
nonvirtual entity GetGroundEntity(void)
Returns the entity we're standing on.
Definition Entity.qc:191
nonvirtual void Transport(vector, vector)
Move the entity to a new position, with updated angles.
Definition Entity.qc:1872
nonvirtual bool DropToFloor(void)
When called, will drop the entity down onto the surface it's hovering over.
Definition Entity.qc:94
nonvirtual bool StartSound(string, float, float, bool)
Plays a sound sample directly onto the entity.
Definition Entity.qc:1779
nonvirtual void SetScale(float)
Sets the scale of the entity.
Definition Entity.qc:614
nonvirtual vector GetViewAngle(void)
Returns an euler angle of where the entity is 'looking' at.
Definition Entity.qc:625
nonvirtual bool IsFacingPosition(vector)
Returns either true or false depending on if this entity is facing a position in question.
Definition Entity.qc:1853
nonvirtual void SetTouch(void())
Overrides the touch function of a the entity to the specified function.
Definition Entity.qc:590
nonvirtual void ClearVelocity(void)
When called, will clear anything related to physical movement on the entity.
Definition Entity.qc:965
nonvirtual void SetAngularVelocity(vector)
Sets the angular velocity of the entity in degrees per second on each axis.
Definition Entity.qc:704
nonvirtual void EnablePlayerCollision(void)
Will enable collision with players, which is the default.
Definition Entity.qc:2020
virtual void ReloadVideoResources(void)
Client: Called when video resources need to be allocated or reloaded for the entity.
Definition Entity.qc:216
nonvirtual bool WithinBounds(entity)
Returns whether or not we are fully within the bounds of a given entity.
Definition Entity.qc:1753
nonvirtual void SetSize(vector, vector)
Sets the bounding box size of the entity.
Definition Entity.qc:710
nonvirtual void ForceNetworkUpdate(void)
Forces the entity to re-network updates to all clients.
nonvirtual void SetParent(string)
Call this to parent the entity to another entity.
nonvirtual void UseBy(entity)
Simulates the press of the use/activate key, with the passed entity being the activator.
void ncTrigger(void)
Definition Trigger.qc:22
float flags
Definition soundDef.h:114