Nuclide
Software Development Kit for id Technology (BETA)
Entity.h
1/*
2 * Copyright (c) 2016-2024 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
22typedef enumflags
23{
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,
35 BASEFL_CHANGED_SIZE,
36 BASEFL_CHANGED_FLAGS,
37 BASEFL_CHANGED_SOLID,
38 BASEFL_CHANGED_FRAME,
39 BASEFL_CHANGED_SKIN,
40 BASEFL_CHANGED_MOVETYPE,
41 BASEFL_CHANGED_EFFECTS,
42 BASEFL_CHANGED_SCALE,
43} nsentity_changed_t;
44
54{
55public:
58 void ncEntity(void);
59
60#ifdef CLIENT
62 virtual void ReceiveEntity(float,float);
63
64 virtual void ReceiveEvent(float);
65
66 virtual float predraw(void);
67
69 virtual void postdraw(void);
70
72 virtual void RendererRestarted(void);
73#endif
74
75 /* overrides */
76 virtual void SpawnKey(string,string);
77 virtual void Spawned(void);
78 virtual void Precache(void);
79 nonvirtual void Spawn(void);
80
84 virtual void MakeStatic(void);
85
88 virtual bool CanSpawn(bool clientSide);
89
91 nonvirtual bool HasModel(void);
92
93#ifdef SERVER
94 virtual void Respawn(void);
95 virtual void Input(entity,string,string);
96 virtual void Save(float);
97 virtual void Restore(string,string);
98 virtual void ParentUpdate(void);
99
100 nonvirtual void Event_SpawnDefRelative(string, float, float, float);
101
102 nonvirtual bool SharesPVSWithPlayer(void);
103
104 /* Server-side rendering function. Expensive, but useful. */
105 virtual void DebugDraw(void);
106
108 virtual void EvaluateEntity(void);
109
111 virtual float SendEntity(entity,float);
112
114 nonvirtual entity GetParent(void);
115
117 nonvirtual void SetParent(string);
118
120 nonvirtual void SetParentAttachment(string);
121
123 nonvirtual void ClearParent(void);
124
126 nonvirtual void RestoreAngles(void);
127
129 nonvirtual void ClearAngles(void);
130
132 nonvirtual void UseBy(entity);
133
135 nonvirtual void ForceNetworkUpdate(void);
136#endif
137
138 /* sets */
140 nonvirtual void SetEffects(__int32);
142 nonvirtual void AddEffects(__int32);
144 nonvirtual void RemoveEffects(__int32);
146 nonvirtual void SetFrame(float);
148 nonvirtual void SetSkin(float);
150 nonvirtual void SetScale(float);
152 nonvirtual void SetOwner(entity);
154 nonvirtual void SetVelocity(vector);
155
157 nonvirtual void AddAngularVelocity(vector);
159 nonvirtual void AddVelocity(vector);
160
163 nonvirtual void SetTouch(void());
165 nonvirtual void SetSendFlags(float);
167 nonvirtual void SetSolid(float);
169 virtual void SetModel(string);
171 nonvirtual void SetModelindex(float);
173 nonvirtual void SetMovetype(float);
175 nonvirtual void SetGravity(float);
177 nonvirtual void SetAngles(vector);
179 nonvirtual void SetAngularVelocity(vector);
181 nonvirtual void SetOrigin(vector);
183 nonvirtual void SetOriginUnstick(vector);
186 nonvirtual void SetSize(vector,vector);
188 nonvirtual void AddFlags(float);
190 nonvirtual void RemoveFlags(float);
192 nonvirtual void AddVFlags(float);
194 nonvirtual void RemoveVFlags(float);
195
197 nonvirtual void TurnTo(float);
199 nonvirtual void TurnToPos(vector);
200
201 /* gets */
203 nonvirtual __int32 GetEffects(void);
205 nonvirtual float GetFrame(void);
207 nonvirtual float GetSkin(void);
209 nonvirtual float GetScale(void);
211 nonvirtual entity GetOwner(void);
213 nonvirtual vector GetVelocity(void);
215 nonvirtual float GetSolid(void);
217 nonvirtual string GetModel(void);
219 nonvirtual float GetModelindex(void);
221 nonvirtual float GetMovetype(void);
223 nonvirtual float GetGravity(void);
225 nonvirtual vector GetAngles(void);
227 nonvirtual vector GetAngularVelocity(void);
229 nonvirtual vector GetOrigin(void);
231 nonvirtual vector GetSize(void);
233 nonvirtual vector GetMins(void);
235 nonvirtual vector GetMaxs(void);
238 nonvirtual vector GetRealMins(void);
241 nonvirtual vector GetRealMaxs(void);
244 nonvirtual vector GetAbsoluteMins(void);
247 nonvirtual vector GetAbsoluteMaxs(void);
249 nonvirtual float GetFlags(void);
251 nonvirtual float HasFlags(float);
253 nonvirtual float GetVFlags(void);
255 nonvirtual float HasVFlags(float);
256
258 nonvirtual void ClearVelocity(void);
259
260 /* eye/shoot pos/angle */
262 nonvirtual vector GetEyePos(void);
264 nonvirtual void SetEyePos(vector);
266 nonvirtual vector GetViewAngle(void);
267
268 /* drawing related */
270 nonvirtual void Show(void);
272 nonvirtual void Hide(void);
274 nonvirtual bool IsHidden(void);
276 nonvirtual bool IsSolid(void);
277
280 nonvirtual void Disappear(void);
282 nonvirtual void UpdateBounds(void);
283
284 /* useful methods, (some) based on GMod's API */
286 nonvirtual float EntIndex(void);
288 nonvirtual bool DropToFloor(void);
290 nonvirtual vector GetForward(void);
292 nonvirtual vector GetRight(void);
294 nonvirtual vector GetUp(void);
296 nonvirtual vector WorldSpaceCenter(void);
306 nonvirtual float WaterLevel(void);
307
309 nonvirtual bool Visible(entity);
311 nonvirtual bool VisibleVec(vector);
313 nonvirtual float DistanceFromYaw(vector);
315 nonvirtual bool HasSpawnFlags(float);
317 nonvirtual bool IsOnGround(void);
321 nonvirtual entity GetGroundEntity(void);
323 nonvirtual bool CreatedByMap(void);
325 nonvirtual bool WithinBounds(entity);
327 nonvirtual bool IntersectsWith(entity);
328
329 /* useful methods, (some) based on Doom 3's API */
332 nonvirtual bool StartSound(string,float,float,bool);
335 nonvirtual bool StartSoundDef(string,float,bool);
337 nonvirtual void StopSound(float,bool);
338
341 nonvirtual vector NearestWallPointForRadius(float);
342
346 nonvirtual void HandleThink(void);
347
349 nonvirtual bool IsFacing(entity);
350
352 nonvirtual bool IsFacingPosition(vector);
353
355 nonvirtual float GetSpawnAge(void);
356
358 nonvirtual float GetSpawnTime(void);
360 nonvirtual void Transport(vector, vector);
361
363 nonvirtual void Relink(void);
364
366 nonvirtual vector GetNearbySpot(void);
367
369 nonvirtual int GetSharedID(void);
370
372 virtual bool AttackByDef(string, bool);
373
375 nonvirtual void SetBotTag(botInfo_t);
376
378 nonvirtual void EnablePlayerCollision(void);
380 nonvirtual void DisablePlayerCollision(void);
382 nonvirtual bool HeldByPlayer(void);
384 nonvirtual bool IsBrush(void);
385
386private:
387 float m_flSpawnTime;
388 bool m_bHidden;
389 vector m_vecMins;
390 vector m_vecMaxs;
392 bool m_bIsBrush;
393 vector m_vecEditorColor;
394
395 NETWORKED_INT(entityDefID)
396 NETWORKED_VECTOR_N(origin)
397 NETWORKED_VECTOR_N(angles)
398 NETWORKED_FLOAT_N(modelindex)
399 NETWORKED_VECTOR_N(size)
400 NETWORKED_VECTOR_N(mins)
401 NETWORKED_VECTOR_N(maxs)
402 NETWORKED_FLOAT_N(solid)
403 NETWORKED_FLOAT_N(movetype)
404 NETWORKED_FLOAT_N(scale)
405 NETWORKED_FLOAT_N(flags)
406 NETWORKED_FLOAT_N(vv_flags)
407 NETWORKED_VECTOR_N(velocity)
408 NETWORKED_VECTOR_N(avelocity)
409
410#ifdef CLIENT
412 virtual void _ReceiveComplete(float, float);
413#endif
414
415 entity m_holdingPlayer;
416 float m_lastHeldTime;
417
418#ifdef SERVER
419 string m_parent;
420 string m_parent_old;
421 string m_parent_attachment;
422
423 vector m_parentPosOffs;
424 vector m_parentAngOffs;
425
426 NETWORKED_FLOAT_N(frame)
427 NETWORKED_FLOAT_N(skin)
428 __int32 effects_net;
429 vector m_vecModelMins;
430 vector m_vecModelMaxs;
431 nonvirtual vector GetModelMins(void);
432 nonvirtual vector GetModelMaxs(void);
433#endif
435 nonvirtual bool _ProjectileAttack(string, bool);
436};
437
440ncEntity spawnClass(string className, vector desiredPos);
441
442#ifdef SERVER
443bool changeClass(entity target, string className)
444#endif
445
446void sendInput(entity target, string inputName, string dataString, entity activator);
447
448bool isAI(entity entityToCheck);
449
450bool isAlive(entity entityToCheck);
451
452bool isGodMode(entity entityToCheck);
453
454bool isClient(entity entityToCheck);
455
456bool isPlayer(entity entityToCheck);
457
458bool isSentient(entity entityToCheck);
459
460bool isBot(entity entityToCheck);
461
462bool isItem(entity entityToCheck);
463
464bool isWeapon(entity entityToCheck);
ncEntity is the lowest of the user-accessible entity class.
Definition: Entity.h:54
nonvirtual entity GetOwner(void)
Returns the owner of the entity.
Definition: Entity.qc:848
nonvirtual vector GetMaxs(void)
Returns the bounding box maxs of the entity.
Definition: Entity.qc:917
nonvirtual float GetSpawnTime(void)
Returns the absolute timestamp of when the entity had been spawned.
Definition: Entity.qc:1425
nonvirtual float GetFlags(void)
Returns an engine flags bitfield that the entity associates with.
Definition: Entity.qc:947
nonvirtual void Show(void)
When called, will unhide the entity.
Definition: Entity.qc:1275
nonvirtual void SetBotTag(botInfo_t)
Sets the Info Tags tag on this entity to the desired botInfo_t tag.
Definition: Entity.qc:1574
nonvirtual vector NearestWallPointForRadius(float)
Returns the nearest point on a wall of this entity within a specified radius.
Definition: Entity.qc:1385
nonvirtual float GetVFlags(void)
Returns a nuclide flags bitfield that the entity associates with.
Definition: Entity.qc:953
nonvirtual __int32 GetEffects(void)
Returns a bitfield of the active effects running on the entity.
Definition: Entity.qc:828
nonvirtual void SetEffects(__int32)
Sets the whole effects field.
Definition: Entity.qc:517
nonvirtual void SetAngles(vector)
Sets the direction the entity is facing in eueler angles.
Definition: Entity.qc:701
nonvirtual vector GetRealMins(void)
Returns the actual bounding box mins of the entity, before having been affected by scale modifiers.
Definition: Entity.qc:923
virtual void SpawnKey(string, string)
This method handles entity key/value pairs on map load.
Definition: Entity.qc:1211
nonvirtual vector GetMins(void)
Returns the bounding box mins of the entity.
Definition: Entity.qc:911
nonvirtual void Hide(void)
When called, the entity will stop being rendered on the client.
Definition: Entity.qc:1281
nonvirtual void SetMovetype(float)
Sets the movement type of the entity.
Definition: Entity.qc:599
nonvirtual float HasFlags(float)
Returns true if the entity has the specified engine flags.
Definition: Entity.qc:959
virtual void postdraw(void)
Client: Run after the rendering of 3D world is complete.
Definition: Entity.qc:282
nonvirtual vector GetAbsoluteMaxs(void)
Returns the absolute bounding box maxs of the entity, instead of being relative to the world position...
Definition: Entity.qc:941
nonvirtual void AddFlags(float)
Adds one or more engine specific flags to the entity.
Definition: Entity.qc:797
nonvirtual void RemoveFlags(float)
Remove one or more engine specific flags from the entity.
Definition: Entity.qc:802
virtual void ReceiveEvent(float)
Definition: Entity.qc:273
nonvirtual float HasVFlags(float)
Returns true if the entity has the specified, nuclide specific, flags.
Definition: Entity.qc:965
nonvirtual void SetSkin(float)
Sets the skingroup of the entity.
Definition: Entity.qc:567
nonvirtual void TurnTo(float)
Turns to the specified angle.
Definition: Entity.qc:818
nonvirtual bool IsFacing(entity)
Returns either true or false depending on if this entity is facing the entity in question.
Definition: Entity.qc:1405
nonvirtual float GetGravity(void)
Returns the gravity modifier of the entity.
Definition: Entity.qc:881
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:990
nonvirtual string GetModel(void)
Returns the name of the 3D model representation of the entity.
Definition: Entity.qc:863
virtual void Precache(void)
Definition: Entity.qc:55
nonvirtual bool SharesPVSWithPlayer(void)
nonvirtual bool HeldByPlayer(void)
Returns whether this entity is being held in the hands of a player.
Definition: Entity.qc:201
nonvirtual bool IntersectsWith(entity)
Returns whether or not the given entity insersects with us.
Definition: Entity.qc:1325
nonvirtual void Relink(void)
Relink the entity against the world.
Definition: Entity.qc:1447
nonvirtual bool Visible(entity)
Returns if the entity is visible by another entity and a field of view of 90 degrees.
Definition: Entity.qc:148
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:1582
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:128
nonvirtual void SetOrigin(vector)
Sets the absolute 3D world position of the entity.
Definition: Entity.qc:729
nonvirtual void Spawn(void)
Definition: Entity.qc:38
nonvirtual float GetSkin(void)
Returns the currently equipped skin of the entity.
Definition: Entity.qc:838
nonvirtual void RemoveVFlags(float)
Remove one or more nuclide specific flags from the entity.
Definition: Entity.qc:813
nonvirtual void SetModelindex(float)
Sets the 3D model representation of the entity from an already precached resource id.
Definition: Entity.qc:763
void ncEntity(void)
The constructor.
Definition: Entity.qc:29
virtual void RendererRestarted(void)
Client: Called when video resources need to be allocated or reloaded for the entity.
Definition: Entity.qc:208
nonvirtual void StopSound(float, bool)
Stops a sound sample or soundDef that is playing on the given channel.
Definition: Entity.qc:1369
nonvirtual void UpdateBounds(void)
Call this if you want to update bounding boxes to take angles into account.
Definition: Entity.qc:654
nonvirtual vector GetAngles(void)
Returns the direction the entity is facing in euler angles.
Definition: Entity.qc:887
nonvirtual vector GetUp(void)
Returns a normalized up vector of the entity to more easily test what may be above it.
Definition: Entity.qc:110
virtual void Spawned(void)
Called when the entity is fulled initialized.
Definition: Entity.qc:69
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:780
nonvirtual void RemoveEffects(__int32)
Removes one or more effects from the entity.
Definition: Entity.qc:791
nonvirtual void SetOwner(entity)
Sets the owner of the entity.
Definition: Entity.qc:573
nonvirtual bool StartSoundDef(string, float, bool)
Plays a soundDef on the entity.
Definition: Entity.qc:1361
virtual void SetModel(string)
Sets the 3D model representation of the entity from a file path and name.
Definition: Entity.qc:747
nonvirtual vector GetRealMaxs(void)
Returns the actual bounding box maxs of the entity, before having been affected by scale modifiers.
Definition: Entity.qc:929
virtual void ReceiveEntity(float, float)
Client: Handles network updates from the server for the associated entity.
Definition: Entity.qc:225
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:858
nonvirtual vector GetVelocity(void)
Returns the movement velocity of the entity.
Definition: Entity.qc:853
nonvirtual void DisablePlayerCollision(void)
Will disable collision with player entities.
Definition: Entity.qc:1599
virtual void Input(entity, string, string)
Called when we are being prompted by another object/function with an input message.
Definition: Entity.qc:1090
nonvirtual bool IsOnGround(void)
Returns if the entity is aligned to the ground.
Definition: Entity.qc:177
nonvirtual bool IsBrush(void)
Returns whether this entity is a brush or using a sub-model of the level.
Definition: Entity.qc:741
nonvirtual void AddAngularVelocity(vector)
Adds onto the existing angular velocity.
Definition: Entity.qc:774
nonvirtual bool CreatedByMap(void)
Returns if the entity was spawned by the map we're on.
Definition: Entity.qc:195
virtual void Save(float)
Handles saving a copy of this entity to a given filehandle.
Definition: Entity.qc:1007
nonvirtual vector GetSize(void)
Returns the virtual size of the entity.
Definition: Entity.qc:905
virtual void Restore(string, string)
Similar to ncIO::SpawnKey() but for save-game fields.
Definition: Entity.qc:1026
nonvirtual float GetModelindex(void)
Returns the model id of the 3D model representation of the entity.
Definition: Entity.qc:869
virtual void DebugDraw(void)
nonvirtual float GetScale(void)
Returns the scale modifier of the entity.
Definition: Entity.qc:843
nonvirtual vector GetOrigin(void)
Returns the absolute world position of the entity.
Definition: Entity.qc:899
nonvirtual float WaterLevel(void)
Returns the water level the entity is in.
Definition: Entity.qc:122
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:183
nonvirtual void HandleThink(void)
For physics functions only.
Definition: Entity.qc:1393
nonvirtual vector GetAbsoluteMins(void)
Returns the absolute bounding box mins of the entity, instead of being relative to the world position...
Definition: Entity.qc:935
nonvirtual vector GetRight(void)
Returns a normalized right vector of the entity to more easily test what's right next to it.
Definition: Entity.qc:104
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:579
nonvirtual void SetFrame(float)
Sets the framegroup sequence of the entity.
Definition: Entity.qc:523
nonvirtual void AddVFlags(float)
Adds one or more nuclide specific flags to the entity.
Definition: Entity.qc:808
nonvirtual void SetEyePos(vector)
Sets the relative position of the eyes.
Definition: Entity.qc:638
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:165
virtual void MakeStatic(void)
Tells the engine to make the entity static, effectively making it inaccessible.
Definition: Entity.qc:1300
nonvirtual vector GetAngularVelocity(void)
Returns the direction the entity is spinning in degrees per second for each axis.
Definition: Entity.qc:893
nonvirtual float GetSpawnAge(void)
Returns the time that's passed since the entity has been spawned.
Definition: Entity.qc:1419
nonvirtual float EntIndex(void)
Returns the unique entity id of the entity.
Definition: Entity.qc:86
nonvirtual void SetSendFlags(float)
Overrides the field that's used to determine which information should be networked.
Definition: Entity.qc:591
nonvirtual void Event_SpawnDefRelative(string, float, float, float)
Definition: Entity.qc:1075
nonvirtual float GetFrame(void)
Returns the currently active framegroup of the entity.
Definition: Entity.qc:833
nonvirtual void SetOriginUnstick(vector)
Same as SetOrigin(), but will push the entity out the ground if needed.
Definition: Entity.qc:735
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:214
nonvirtual void SetGravity(float)
Sets the gravitational modifier of the entity.
Definition: Entity.qc:605
nonvirtual vector GetEyePos(void)
Returns the absolute world position of where the eyes are located.
Definition: Entity.qc:644
nonvirtual float GetMovetype(void)
Returns the movement type of the entity.
Definition: Entity.qc:875
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:786
nonvirtual vector GetNearbySpot(void)
Finds a free spot of an entity near itself of same size.
Definition: Entity.qc:1453
nonvirtual void TurnToPos(vector)
Turns towards the specified position.
Definition: Entity.qc:823
nonvirtual bool IsHidden(void)
Returns if the entity is currently being hidden explicitly.
Definition: Entity.qc:1287
nonvirtual bool HasModel(void)
Returns if this entity has a model set.
Definition: Entity.qc:80
nonvirtual vector GetForward(void)
Returns a normalized forward vector of the entity to more easily test which way it's facing.
Definition: Entity.qc:98
nonvirtual vector WorldSpaceCenter(void)
Returns absolute world coordinates of the center of the entity according to its pivot point.
Definition: Entity.qc:116
nonvirtual bool HasSpawnFlags(float)
Returns if the entity has any spawnflags set.
Definition: Entity.qc:171
nonvirtual void Disappear(void)
When called it'll make the entity uninteractable (but not destroy it).
Definition: Entity.qc:1293
virtual bool CanSpawn(bool clientSide)
Returns if this entity can spawned from the map file.
Definition: Entity.qc:1306
nonvirtual void SetSolid(float)
Sets the collision type of the entity.
Definition: Entity.qc:611
virtual bool AttackByDef(string, bool)
Will read from the named def to perform an attack.
Definition: Entity.qc:1560
nonvirtual entity GetGroundEntity(void)
Returns the entity we're standing on.
Definition: Entity.qc:189
nonvirtual void Transport(vector, vector)
Move the entity to a new position, with updated angles.
Definition: Entity.qc:1431
nonvirtual bool DropToFloor(void)
When called, will drop the entity down onto the surface it's hovering over.
Definition: Entity.qc:92
nonvirtual bool StartSound(string, float, float, bool)
Plays a sound sample directly onto the entity.
Definition: Entity.qc:1338
nonvirtual void SetScale(float)
Sets the scale of the entity.
Definition: Entity.qc:617
nonvirtual vector GetViewAngle(void)
Returns an euler angle of where the entity is 'looking' at.
Definition: Entity.qc:628
nonvirtual bool IsFacingPosition(vector)
Returns either true or false depending on if this entity is facing a position in question.
Definition: Entity.qc:1412
nonvirtual void SetTouch(void())
Overrides the touch function of a the entity to the specified function.
Definition: Entity.qc:585
nonvirtual void ClearVelocity(void)
When called, will clear anything related to physical movement on the entity.
Definition: Entity.qc:971
nonvirtual void SetAngularVelocity(vector)
Sets the angular velocity of the entity in degrees per second on each axis.
Definition: Entity.qc:707
nonvirtual void EnablePlayerCollision(void)
Will enable collision with players, which is the default.
Definition: Entity.qc:1592
nonvirtual bool WithinBounds(entity)
Returns whether or not we are fully within the bounds of a given entity.
Definition: Entity.qc:1312
nonvirtual void SetSize(vector, vector)
Sets the bounding box size of the entity.
Definition: Entity.qc:713
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.
ncTrigger handles all the non-input as well as Legacy (Quake, GoldSource) style trigger behaviour.
Definition: Trigger.h:71
botInfo_t
Definition: botinfo.h:29
typedef enumflags
Defines the valid alignment flags for text fields.
Definition: font.h:37
float flags
Definition: sound.h:114