202class Entity :
public SimpleEntity
205 CLASS_PROTOTYPE(Entity);
230 float orientation[3][3];
231 gentity_t *groundentity;
232 cplane_t groundplane;
237 int children[MAX_MODEL_CHILDREN];
244 class Entity *teamchain;
245 class Entity *teammaster;
248 class Entity *bindmaster;
249 qboolean bind_use_my_angles;
270 float damage_debounce_time;
275 EntityPtr m_pGlues[MAX_GLUE_CHILDREN];
276 int m_pGluesFlags[MAX_GLUE_CHILDREN];
277 class Entity *m_pGlueMaster;
279 bool m_bGlueDuckable;
280 qboolean detach_at_death;
283 float stealthMovementScale;
284 qboolean m_bMovementStealthScript;
286 int m_iNumBlockedPaths;
296 bool m_bHintRequiresLookAt;
301 MulticastDelegate<void(
const Event& ev)> delegate_damage;
302 MulticastDelegate<void(
const Event& ev)> delegate_killed;
303 MulticastDelegate<void(
const Event& ev)> delegate_gotKill;
309 void EventGetNormalHealth(Event *ev);
310 void EventNormalDamage(Event *ev);
311 void ClassnameEvent(Event *ev);
312 void SpawnFlagsEvent(Event *ev);
313 void EventRevive(Event *ev);
315 virtual void ShowInfo(
float fDot,
float fDist);
317 qboolean DistanceTo(Vector pos)
const;
318 qboolean DistanceTo(Entity *ent)
const;
319 qboolean WithinDistance(Vector pos,
float dist)
const;
320 qboolean WithinDistance(Entity *ent,
float dist)
const;
322 Vector GetControllerAngles(
int num);
323 void SetControllerAngles(
int num,
const vec3_t angles);
324 void SetControllerAngles(Event *ev);
325 void GetControllerAngles(Event *ev);
326 void SetControllerTag(
int num,
int tag_num);
327 int GetControllerTag(
int num)
const;
328 qboolean GetTagPositionAndOrientation(str tagname,
orientation_t *new_or);
329 void GetTagPositionAndOrientation(
int tagnum,
orientation_t *new_or);
330 void GetTagPosition(Event *ev);
331 void GetTagAngles(Event *ev);
333 void EventTrace(Event *ev);
334 void EventSightTrace(Event *ev);
335 void EventInPVS(Event *ev);
336 void IsTouching(Event *ev);
337 void IsInside(Event *ev);
338 void CanSeeInternal(Event *ev,
bool bNoEnts);
339 void CanSee(Event *ev);
340 void CanSeeNoEnts(Event *ev);
342 void SetKillTarget(
const char *killtarget);
343 const char *KillTarget(
void);
345 void AlwaysDraw(Event *ev);
346 void NormalDraw(Event *ev);
347 void NeverDraw(Event *ev);
349 const char *getModel()
const;
350 void GetModelEvent(Event *ev);
351 void GetBrushModelEvent(Event *ev);
352 virtual qboolean setModel(
void);
354 void setModel(
const str& mdl);
355 void SetModelEvent(Event *ev);
357 void SetTeamEvent(Event *ev);
358 virtual void TriggerEvent(Event *ev);
359 void hideModel(
void);
360 void EventHideModel(Event *ev);
361 virtual void showModel(
void);
362 void EventShowModel(Event *ev);
363 qboolean hidden(
void);
364 void ProcessInitCommands(
void);
366 void setAlpha(
float alpha);
369 void setMoveType(
int type);
370 int getMoveType(
void);
372 void setSolidType(solid_t type);
373 int getSolidType(
void);
375 virtual void setContentsSolid(
void);
377 virtual Vector getParentVector(Vector vec);
378 Vector getLocalVector(Vector vec);
380 virtual void setSize(Vector min, Vector max);
381 virtual void updateOrigin(
void);
382 virtual void setLocalOrigin(Vector org);
383 void setOrigin(Vector org)
override;
384 void setOriginEvent(Vector org)
override;
385 virtual void setOrigin(
void);
386 virtual void addOrigin(Vector org);
389 qboolean GetRawTag(
const char *tagname,
orientation_t *orient);
393 void GetTag(
int tagnum, Vector *pos, Vector *forward = NULL, Vector *left = NULL, Vector *up = NULL);
394 qboolean GetTag(
const char *name, Vector *pos, Vector *forward = NULL, Vector *left = NULL, Vector *up = NULL);
396 virtual int CurrentAnim(
int slot = 0)
const;
397 virtual float CurrentTime(
int slot = 0)
const;
398 void ClearAnimSlot(
int slot);
399 void StartAnimSlot(
int slot,
int index,
float weight);
400 void RestartAnimSlot(
int slot);
402 void setAngles(Vector ang)
override;
403 virtual void setAngles(
void);
408 void setContents(
int type);
409 int getContents(
void);
410 void setScale(
float scale);
412 qboolean droptofloor(
float maxfall);
413 qboolean isClient(
void);
415 virtual void SetDeltaAngles(
void);
416 virtual void DamageEvent(Event *event);
430 void DamageType(Event *ev);
431 qboolean IsTouching(Entity *e1);
432 qboolean IsInside(Entity *e1);
433 qboolean FovCheck(
float *delta,
float fovdot);
436 virtual bool CanSee(Entity *ent,
float fov,
float vision_distance,
bool bNoEnts =
false);
437 virtual bool CanSee(
const Vector& org,
float fov,
float vision_distance,
bool bNoEnts =
false);
438 bool AreasConnected(
const Entity *other);
439 void FadeNoRemove(Event *ev);
440 void FadeOut(Event *ev);
441 void FadeIn(Event *ev);
442 void Fade(Event *ev);
443 void Sink(Event *ev);
445 virtual void CheckGround(
void);
446 virtual qboolean HitSky(
trace_t *trace);
447 virtual qboolean HitSky(
void);
449 void SafeSolid(Event *ev);
450 void BecomeSolid(Event *ev);
451 void BecomeNonSolid(Event *ev);
452 void SetSize(Event *ev);
453 void SetMins(Event *ev);
454 void SetMaxs(Event *ev);
457 void GetMins(Event *ev);
458 void GetMaxs(Event *ev);
460 void SetScale(Event *ev);
461 void GetScale(Event *ev);
462 void SetAlpha(Event *ev);
463 void SetKillTarget(Event *ev);
464 void TouchTriggersEvent(Event *ev);
466 str GetRandomAlias(str name, AliasListNode_t **ret);
467 void SetWaterType(
void);
471 attach(
int parent_entity_num,
int tag_num, qboolean use_angles = qtrue, Vector attach_offset = Vector(
"0 0 0"));
477 void ProcessSoundEvent(Event *ev, qboolean checkSubtitle);
478 void Sound(Event *ev);
481 int channel = CHAN_BODY,
483 float min_dist = -1.0,
484 Vector *origin = NULL,
488 int checkSubtitle = 1,
489 float max_dist = -1.0f
491 void StopSound(
int channel);
492 void StopSound(Event *ev);
493 void LoopSound(Event *ev);
495 LoopSound(str sound_name,
float volume = -1.0,
float min_dist = -1.0,
float max_dist = -1.0,
float pitch = -1.0);
496 void StopLoopSound(Event *ev);
497 void StopLoopSound(
void);
498 void StopAllSounds();
500 void SetLight(Event *ev);
501 void LightOn(Event *ev);
502 void LightOff(Event *ev);
503 void LightRed(Event *ev);
504 void LightGreen(Event *ev);
505 void LightBlue(Event *ev);
506 void LightRadius(Event *ev);
507 void LightStyle(Event *ev);
508 void Flags(Event *ev);
509 void Effects(Event *ev);
510 void RenderEffects(Event *ev);
511 void SVFlags(Event *ev);
513 void BroadcastAIEvent(
int iType = AI_EVENT_MISC,
float rad = SOUND_RADIUS);
514 void BroadcastAIEvent(Event *ev);
515 void Kill(Event *ev);
516 virtual void Killed(Event *ev);
517 void SurfaceModelEvent(Event *ev);
518 void SurfaceCommand(
const char *surf_name,
const char *token);
519 virtual void Postthink(
void);
520 virtual void Think(
void);
522 void DamageSkin(
trace_t *trace,
float damage);
524 void AttachEvent(Event *ev);
525 void AttachModelEvent(Event *ev);
526 void RemoveAttachedModelEvent(Event *ev);
527 void AttachedModelAnimEvent(Event *ev);
528 void DetachEvent(Event *ev);
529 void TakeDamageEvent(Event *ev);
530 void NoDamageEvent(Event *ev);
531 void Gravity(Event *ev);
532 void GiveOxygen(
float time);
533 void UseBoundingBoxEvent(Event *ev);
534 void HurtEvent(Event *ev);
535 void HealEvent(Event *ev);
536 void SetMassEvent(Event *ev);
537 void Censor(Event *ev);
538 void Ghost(Event *ev);
540 void StationaryEvent(Event *ev);
541 void TossEvent(Event *ev);
542 void Explosion(Event *ev);
544 void Shader(Event *ev);
546 void KillAttach(Event *ev);
547 void SetBloodModel(Event *ev);
549 void DropToFloorEvent(Event *ev);
552 void joinTeam(Entity *teammember);
554 qboolean isBoundTo(Entity *master);
555 virtual void bind(Entity *master, qboolean use_my_angles = qfalse);
556 virtual void unbind(
void);
557 virtual void glue(Entity *master, qboolean use_my_angles = qtrue, qboolean can_duck = qfalse);
558 virtual void unglue(
void);
559 void GlueEvent(Event *ev);
560 void DuckableGlueEvent(Event *ev);
561 void MakeClayPidgeon(Event *ev);
562 void EventUnglue(Event *ev);
564 void JoinTeam(Event *ev);
565 void EventQuitTeam(Event *ev);
566 void BindEvent(Event *ev);
567 void EventUnbind(Event *ev);
568 void AddToSoundManager(Event *ev);
569 void NoLerpThisFrame(
void);
571 virtual void addAngles(Vector add);
573 void DeathSinkStart(Event *ev);
574 void DeathSink(Event *ev);
576 void DetachAllChildren(Event *ev);
577 void SetMovementStealth(
float fStealthScale);
578 qboolean HasMovementStealthOverride(
void)
const;
579 void EventMovementStealth(Event *ev);
581 virtual void VelocityModified(
void);
583 qboolean CheckEventFlags(Event *event);
584 void PusherEvent(Event *ev);
585 void SetShaderData(Event *ev);
587 void GetVelocity(Event *ev);
588 void SetVelocity(Event *ev);
589 void GetAVelocity(Event *ev);
590 void DoForceActivate(
void);
591 void ForceActivate(Event *ev);
593 void ConnectPaths(
void);
594 void DisconnectPaths(
void);
596 void EventConnectPaths(Event *ev);
597 void EventDisconnectPaths(Event *ev);
598 virtual void Delete(
void);
599 void Remove(Event *ev);
600 void EventSoundDone(Event *ev);
602 void VolumeDamage(
float damage);
603 void EventVolumeDamage(Event *ev);
605 virtual qboolean IsDead()
const;
606 virtual void AddImmunity(Event *ev);
607 virtual void RemoveImmunity(Event *ev);
608 qboolean Immune(
int meansofdeath);
610 virtual void ClientThink(
void);
612 virtual void EndFrame(
void);
613 virtual void CalcBlend(
void);
614 void Archive(
Archiver& arc)
override;
615 virtual bool AutoArchiveModel(
void);
616 virtual void PathnodeClaimRevoked(
class PathNode *node);
617 virtual qboolean BlocksAIMovement()
const;
618 virtual qboolean AIDontFace(
void)
const;
619 void SetHealth(Event *ev);
620 void GetHealth(Event *ev);
621 void EventSetMaxHealth(Event *ev);
622 void EventGetMaxHealth(Event *ev);
623 void EventSetHealthOnly(Event *ev);
624 void GetYaw(Event *ev);
626 virtual void PreAnimate(
void);
627 virtual void PostAnimate(
void);
628 virtual bool HasVehicle(
void)
const;
629 void EventGetEntnum(Event *ev);
630 void EventGetClassname(Event *ev);
631 void EventSetRadnum(Event *ev);
632 void EventGetRadnum(Event *ev);
633 void EventSetRotatedBbox(Event *ev);
634 void EventGetRotatedBbox(Event *ev);
635 void MPrintf(
const char *msg, ...);
636 void DrawBoundingBox(
int showbboxes);
638 void EventSinglePlayerCommand(Event *ev);
639 void EventMultiPlayerCommand(Event *ev);
640 void EventRealismModeCommand(Event *ev);
641 void EventSPRealismModeCommand(Event *ev);
642 void EventDMRealismModeCommand(Event *ev);
643 void GetLocalYawFromVector(Event *ev);
644 void EventShootableOnly(Event *ev);
645 void SetShaderTime(Event *ev);
646 void NoTarget(Event *ev);
651 void ProcessHint(gentity_t *client,
bool bShow);
652 void GetZone(Event *ev);
653 void IsInZone(Event *ev);
654 void SetDepthHack(Event *ev);
656 void SetHintRequireLookAt(Event *ev);
657 void SetHintString(Event *ev);
658 void SetShader(Event *ev);
660 void PlayNonPvsSound(
const str& soundName,
float volume = 1);