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;
285 int m_iNumBlockedPaths;
295 bool m_bHintRequiresLookAt;
300 MulticastDelegate<void(
const Event& ev)> delegate_damage;
301 MulticastDelegate<void(
const Event& ev)> delegate_killed;
302 MulticastDelegate<void(
const Event& ev)> delegate_gotKill;
308 void EventGetNormalHealth(Event *ev);
309 void EventNormalDamage(Event *ev);
310 void ClassnameEvent(Event *ev);
311 void SpawnFlagsEvent(Event *ev);
312 void EventRevive(Event *ev);
314 virtual void ShowInfo(
float fDot,
float fDist);
316 qboolean DistanceTo(Vector pos)
const;
317 qboolean DistanceTo(Entity *ent)
const;
318 qboolean WithinDistance(Vector pos,
float dist)
const;
319 qboolean WithinDistance(Entity *ent,
float dist)
const;
321 Vector GetControllerAngles(
int num);
322 void SetControllerAngles(
int num, vec3_t angles);
323 void SetControllerAngles(Event *ev);
324 void GetControllerAngles(Event *ev);
325 void SetControllerTag(
int num,
int tag_num);
326 int GetControllerTag(
int num)
const;
327 qboolean GetTagPositionAndOrientation(str tagname,
orientation_t *new_or);
328 void GetTagPositionAndOrientation(
int tagnum,
orientation_t *new_or);
329 void GetTagPosition(Event *ev);
330 void GetTagAngles(Event *ev);
332 void EventTrace(Event *ev);
333 void EventSightTrace(Event *ev);
334 void EventInPVS(Event *ev);
335 void IsTouching(Event *ev);
336 void IsInside(Event *ev);
337 void CanSeeInternal(Event *ev,
bool bNoEnts);
338 void CanSee(Event *ev);
339 void CanSeeNoEnts(Event *ev);
341 void SetKillTarget(
const char *killtarget);
342 const char *KillTarget(
void);
344 void AlwaysDraw(Event *ev);
345 void NormalDraw(Event *ev);
346 void NeverDraw(Event *ev);
348 const char *getModel()
const;
349 void GetModelEvent(Event *ev);
350 void GetBrushModelEvent(Event *ev);
351 virtual qboolean setModel(
void);
353 void setModel(
const str& mdl);
354 void SetModelEvent(Event *ev);
356 void SetTeamEvent(Event *ev);
357 virtual void TriggerEvent(Event *ev);
358 void hideModel(
void);
359 void EventHideModel(Event *ev);
360 virtual void showModel(
void);
361 void EventShowModel(Event *ev);
362 qboolean hidden(
void);
363 void ProcessInitCommands(
void);
365 void setAlpha(
float alpha);
368 void setMoveType(
int type);
369 int getMoveType(
void);
371 void setSolidType(solid_t type);
372 int getSolidType(
void);
374 virtual void setContentsSolid(
void);
376 virtual Vector getParentVector(Vector vec);
377 Vector getLocalVector(Vector vec);
379 virtual void setSize(Vector min, Vector max);
380 virtual void updateOrigin(
void);
381 virtual void setLocalOrigin(Vector org);
382 void setOrigin(Vector org)
override;
383 void setOriginEvent(Vector org)
override;
384 virtual void setOrigin(
void);
385 virtual void addOrigin(Vector org);
388 qboolean GetRawTag(
const char *tagname,
orientation_t *orient);
392 void GetTag(
int tagnum, Vector *pos, Vector *forward = NULL, Vector *left = NULL, Vector *up = NULL);
393 qboolean GetTag(
const char *name, Vector *pos, Vector *forward = NULL, Vector *left = NULL, Vector *up = NULL);
395 virtual int CurrentAnim(
int slot = 0)
const;
396 virtual float CurrentTime(
int slot = 0)
const;
397 void ClearAnimSlot(
int slot);
398 void StartAnimSlot(
int slot,
int index,
float weight);
399 void RestartAnimSlot(
int slot);
401 void setAngles(Vector ang)
override;
402 virtual void setAngles(
void);
407 void setContents(
int type);
408 int getContents(
void);
409 void setScale(
float scale);
411 qboolean droptofloor(
float maxfall);
412 qboolean isClient(
void);
414 virtual void SetDeltaAngles(
void);
415 virtual void DamageEvent(Event *event);
429 void DamageType(Event *ev);
430 qboolean IsTouching(Entity *e1);
431 qboolean IsInside(Entity *e1);
432 qboolean FovCheck(
float *delta,
float fovdot);
434 virtual bool CanSee(Entity *ent,
float fov,
float vision_distance,
bool bNoEnts =
false);
435 virtual bool CanSee(
const Vector& org,
float fov,
float vision_distance,
bool bNoEnts =
false);
436 bool AreasConnected(
const Entity *other);
437 void FadeNoRemove(Event *ev);
438 void FadeOut(Event *ev);
439 void FadeIn(Event *ev);
440 void Fade(Event *ev);
441 void Sink(Event *ev);
443 virtual void CheckGround(
void);
444 virtual qboolean HitSky(
trace_t *trace);
445 virtual qboolean HitSky(
void);
447 void SafeSolid(Event *ev);
448 void BecomeSolid(Event *ev);
449 void BecomeNonSolid(Event *ev);
450 void SetSize(Event *ev);
451 void SetMins(Event *ev);
452 void SetMaxs(Event *ev);
455 void GetMins(Event *ev);
456 void GetMaxs(Event *ev);
458 void SetScale(Event *ev);
459 void GetScale(Event *ev);
460 void SetAlpha(Event *ev);
461 void SetKillTarget(Event *ev);
462 void TouchTriggersEvent(Event *ev);
464 str GetRandomAlias(str name, AliasListNode_t **ret);
465 void SetWaterType(
void);
469 attach(
int parent_entity_num,
int tag_num, qboolean use_angles = qtrue, Vector attach_offset = Vector(
"0 0 0"));
475 void ProcessSoundEvent(Event *ev, qboolean checkSubtitle);
476 void Sound(Event *ev);
479 int channel = CHAN_BODY,
481 float min_dist = -1.0,
482 Vector *origin = NULL,
486 int checkSubtitle = 1,
487 float max_dist = -1.0f
489 void StopSound(
int channel);
490 void StopSound(Event *ev);
491 void LoopSound(Event *ev);
493 LoopSound(str sound_name,
float volume = -1.0,
float min_dist = -1.0,
float max_dist = -1.0,
float pitch = -1.0);
494 void StopLoopSound(Event *ev);
495 void StopLoopSound(
void);
496 void StopAllSounds();
498 void SetLight(Event *ev);
499 void LightOn(Event *ev);
500 void LightOff(Event *ev);
501 void LightRed(Event *ev);
502 void LightGreen(Event *ev);
503 void LightBlue(Event *ev);
504 void LightRadius(Event *ev);
505 void LightStyle(Event *ev);
506 void Flags(Event *ev);
507 void Effects(Event *ev);
508 void RenderEffects(Event *ev);
509 void SVFlags(Event *ev);
511 void BroadcastAIEvent(
int iType = AI_EVENT_MISC,
float rad = SOUND_RADIUS);
512 void BroadcastAIEvent(Event *ev);
513 void Kill(Event *ev);
514 virtual void Killed(Event *ev);
515 void SurfaceModelEvent(Event *ev);
516 void SurfaceCommand(
const char *surf_name,
const char *token);
517 virtual void Postthink(
void);
518 virtual void Think(
void);
520 void DamageSkin(
trace_t *trace,
float damage);
522 void AttachEvent(Event *ev);
523 void AttachModelEvent(Event *ev);
524 void RemoveAttachedModelEvent(Event *ev);
525 void AttachedModelAnimEvent(Event *ev);
526 void DetachEvent(Event *ev);
527 void TakeDamageEvent(Event *ev);
528 void NoDamageEvent(Event *ev);
529 void Gravity(Event *ev);
530 void GiveOxygen(
float time);
531 void UseBoundingBoxEvent(Event *ev);
532 void HurtEvent(Event *ev);
533 void HealEvent(Event *ev);
534 void SetMassEvent(Event *ev);
535 void Censor(Event *ev);
536 void Ghost(Event *ev);
538 void StationaryEvent(Event *ev);
539 void TossEvent(Event *ev);
540 void Explosion(Event *ev);
542 void Shader(Event *ev);
544 void KillAttach(Event *ev);
545 void SetBloodModel(Event *ev);
547 void DropToFloorEvent(Event *ev);
550 void joinTeam(Entity *teammember);
552 qboolean isBoundTo(Entity *master);
553 virtual void bind(Entity *master, qboolean use_my_angles = qfalse);
554 virtual void unbind(
void);
555 virtual void glue(Entity *master, qboolean use_my_angles = qtrue, qboolean can_duck = qfalse);
556 virtual void unglue(
void);
557 void GlueEvent(Event *ev);
558 void DuckableGlueEvent(Event *ev);
559 void MakeClayPidgeon(Event *ev);
560 void EventUnglue(Event *ev);
562 void JoinTeam(Event *ev);
563 void EventQuitTeam(Event *ev);
564 void BindEvent(Event *ev);
565 void EventUnbind(Event *ev);
566 void AddToSoundManager(Event *ev);
567 void NoLerpThisFrame(
void);
569 virtual void addAngles(Vector add);
571 void DeathSinkStart(Event *ev);
572 void DeathSink(Event *ev);
574 void DetachAllChildren(Event *ev);
575 void SetMovementStealth(
float fStealthScale);
576 void EventMovementStealth(Event *ev);
578 virtual void VelocityModified(
void);
580 qboolean CheckEventFlags(Event *event);
581 void PusherEvent(Event *ev);
582 void SetShaderData(Event *ev);
584 void GetVelocity(Event *ev);
585 void SetVelocity(Event *ev);
586 void GetAVelocity(Event *ev);
587 void DoForceActivate(
void);
588 void ForceActivate(Event *ev);
590 void ConnectPaths(
void);
591 void DisconnectPaths(
void);
593 void EventConnectPaths(Event *ev);
594 void EventDisconnectPaths(Event *ev);
595 virtual void Delete(
void);
596 void Remove(Event *ev);
597 void EventSoundDone(Event *ev);
599 void VolumeDamage(
float damage);
600 void EventVolumeDamage(Event *ev);
602 virtual qboolean IsDead()
const;
603 virtual void AddImmunity(Event *ev);
604 virtual void RemoveImmunity(Event *ev);
605 qboolean Immune(
int meansofdeath);
607 virtual void ClientThink(
void);
609 virtual void EndFrame(
void);
610 virtual void CalcBlend(
void);
611 void Archive(
Archiver& arc)
override;
612 virtual bool AutoArchiveModel(
void);
613 virtual void PathnodeClaimRevoked(
class PathNode *node);
614 virtual qboolean BlocksAIMovement()
const;
615 virtual qboolean AIDontFace(
void)
const;
616 void SetHealth(Event *ev);
617 void GetHealth(Event *ev);
618 void EventSetMaxHealth(Event *ev);
619 void EventGetMaxHealth(Event *ev);
620 void EventSetHealthOnly(Event *ev);
621 void GetYaw(Event *ev);
623 virtual void PreAnimate(
void);
624 virtual void PostAnimate(
void);
625 virtual bool HasVehicle(
void)
const;
626 void EventGetEntnum(Event *ev);
627 void EventGetClassname(Event *ev);
628 void EventSetRadnum(Event *ev);
629 void EventGetRadnum(Event *ev);
630 void EventSetRotatedBbox(Event *ev);
631 void EventGetRotatedBbox(Event *ev);
632 void MPrintf(
const char *msg, ...);
633 void DrawBoundingBox(
int showbboxes);
635 void EventSinglePlayerCommand(Event *ev);
636 void EventMultiPlayerCommand(Event *ev);
637 void EventRealismModeCommand(Event *ev);
638 void EventSPRealismModeCommand(Event *ev);
639 void EventDMRealismModeCommand(Event *ev);
640 void GetLocalYawFromVector(Event *ev);
641 void EventShootableOnly(Event *ev);
642 void SetShaderTime(Event *ev);
643 void NoTarget(Event *ev);
648 void ProcessHint(gentity_t *client,
bool bShow);
649 void GetZone(Event *ev);
650 void IsInZone(Event *ev);
651 void SetDepthHack(Event *ev);
653 void SetHintRequireLookAt(Event *ev);
654 void SetHintString(Event *ev);
655 void SetShader(Event *ev);
657 void PlayNonPvsSound(
const str& soundName,
float volume = 1);