Nuclide
Software Development Kit for id Tech
NSMonster.h
Go to the documentation of this file.
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
17var bool autocvar_ai_debugLogic = false;
18void
19_NSMonster_Log(string className, string functionName, float edictNum, string warnMessage)
20{
22 printf("^9%f ^5%s (%d) ^7: %s\n", time, functionName, edictNum, warnMessage);
23 else
24 printf("^5%s (%d) ^7: %s\n", functionName, edictNum, warnMessage);
25}
26#define NSMonsterLog(...) if (autocvar_ai_debugLogic == true) _NSMonster_Log(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__))
27
33typedef enumflags
34{
35 MONFL_CHANGED_ORIGIN_X,
36 MONFL_CHANGED_ORIGIN_Y,
37 MONFL_CHANGED_ORIGIN_Z,
38 MONFL_CHANGED_ANGLES_X,
39 MONFL_CHANGED_ANGLES_Y,
40 MONFL_CHANGED_ANGLES_Z,
41 MONFL_CHANGED_MODELINDEX,
42 MONFL_CHANGED_SIZE,
43 MONFL_CHANGED_FLAGS,
44 MONFL_CHANGED_SOLID,
45 MONFL_CHANGED_FRAME,
46 MONFL_CHANGED_SKINHEALTH,
47 MONFL_CHANGED_MOVETYPE,
48 MONFL_CHANGED_EFFECTS,
49 MONFL_CHANGED_BODY,
50 MONFL_CHANGED_SCALE,
51 MONFL_CHANGED_VELOCITY,
52 MONFL_CHANGED_RENDERCOLOR,
53 MONFL_CHANGED_RENDERAMT,
54 MONFL_CHANGED_RENDERMODE,
55 MONFL_CHANGED_HEADYAW
56} nsmonster_changed_t;
57
62typedef enum {
141
143typedef enumflags
144{
145 MSF_WAITTILLSEEN,
146 MSF_GAG,
147 MSF_MONSTERCLIP,
148 MSF_RESERVED1,
149 MSF_PRISONER,
150 MSF_RESERVED2,
151 MSF_IGNOREPLAYER,
152 MSF_WAITFORSCRIPT,
153 MSF_RESERVED3,
154 MSF_FADECORPSE,
155 MSF_MULTIPLAYER,
156 MSF_FALLING,
157 MSF_HORDE
158} monsterFlag_t;
159
161typedef enumflags
162{
163 SMSF_WAITTILLSEEN,
164 SMSF_GAG,
165 SMSF_FALLTOGROUND,
166 SMSF_DROPHEALTHKIT,
167 SMSF_EFFICIENT,
168 SMSF_RESERVED1,
169 SMSF_RESERVED2,
170 SMSF_WAITFORSCRIPT,
171 SMSF_LONGVISIBILITY,
172 SMSF_FADECORPSE,
173 SMSF_THINKOUTPVS,
174 SMSF_TEMPLATE,
175 SMSF_ALTCOLLISION,
176 SMSF_NODROPWEAPONS,
177 SMSF_IGNOREPLAYERPUSH
178} sourceMonsterFlag_t;
179
181typedef enum
182{
191
193typedef enum
194{
200
202typedef enum
203{
210
212typedef enum
213{
218
223typedef enum
224{
238
239/* FIXME: I'd like to move this into NSMonster, but our current IsFriend()
240 * check is currently only checking on a .takedamage basis. */
242
325{
326public:
327 void NSMonster(void);
328
329#ifdef SERVER
330 /* overrides */
331 virtual void Save(float);
332 virtual void Restore(string,string);
333 virtual void EvaluateEntity(void);
334 virtual float SendEntity(entity,float);
335 virtual void Touch(entity);
336 //virtual void Hide(void);
337 virtual void Spawned(void);
338 virtual void Respawn(void);
339 virtual void Input(entity,string,string);
340 virtual void Pain(entity, entity, int, vector, int);
341 virtual void Death(entity, entity, int, vector, int);
342 virtual void Physics(void);
343 virtual void Gib(void);
344 virtual void Sound(string);
345 virtual void SpawnKey(string,string);
346
349 virtual void RunAI(void);
351 virtual void IdleNoise(void);
353 virtual void FallNoise(void);
355 virtual void AlertNoise(void);
356
358 virtual bool IsAlive(void);
360 virtual bool IsFriend(int);
362 virtual void HasBeenKilled(void);
364 virtual void HasBeenHit(void);
365 /* Overridable: Called when the monster was gibbed. */
366 virtual void HasBeenGibbed(void);
367 /* Overridable: Called when the monster has been alerted to threat. */
368 virtual void HasBeenAlerted(void);
369
370 /* see/hear subsystem */
372 virtual void SeeThink(void);
374 virtual float SeeFOV(void);
375
377 virtual void AlertNearby(void);
378
379 /* movement */
381 virtual float GetWalkSpeed(void);
383 virtual float GetChaseSpeed(void);
385 virtual float GetRunSpeed(void);
387 virtual float GetYawSpeed(void);
388
389 /* attack system */
391 virtual void AttackDraw(void);
393 virtual void AttackHolster(void);
395 virtual void AttackThink(void);
397 virtual int AttackMelee(void);
399 virtual int AttackRanged(void);
400
402 virtual float MeleeMaxDistance(void);
403
406 virtual bool MeleeCondition(void);
407
409 nonvirtual bool IsValidEnemy(entity);
411 virtual bool IsOnRoute(void);
412
413 /* sequences */
415 virtual void FreeState(void);
417 virtual void FreeStateMoved(void);
419 virtual void FreeStateDead(void);
421 virtual void RouteEnded(void);
423 virtual void WalkRoute(void);
424
426 nonvirtual int GetSequenceState(void);
428 nonvirtual bool InSequence(void);
429
430 /* animation cycles */
432 virtual int AnimIdle(void);
434 virtual int AnimWalk(void);
436 virtual int AnimRun(void);
438 virtual float FramegroupForAct(float);
440 nonvirtual void ActPlay(float);
442 virtual void AnimPlay(float);
444 virtual void AnimationUpdate(void);
446 nonvirtual bool InAnimation(void);
447 nonvirtual void AnimReset(void);
448
449 /* states */
453 nonvirtual void SetState(monsterState_t);
455 nonvirtual monsterState_t GetState(void);
456
457 /* TriggerTarget/Condition */
459 nonvirtual int GetTriggerCondition(void);
461 virtual void TriggerTargets(void);
462
463 virtual void Trigger(entity, triggermode_t);
464#endif
465
466#ifdef CLIENT
467
469 virtual void customphysics(void);
470 virtual float predraw(void);
471 virtual void ReceiveEntity(float,float);
472#endif
473
474private:
475
476 vector v_angle_net;
477
478#ifdef CLIENT
479 nonvirtual void _RenderDebugViewCone();
480#endif
481
482 PREDICTED_FLOAT(m_flHeadYaw)
485
486#ifdef SERVER
487 entity m_eLookAt;
488 entity m_ssLast;
489 vector oldnet_velocity;
490 float m_flPitch;
491 int m_iFlags;
492 vector base_mins;
493 vector base_maxs;
494 float base_health;
495
496 /* sequences */
497 string m_strRouteEnded;
498 int m_iSequenceRemove;
499 int m_iSequenceState;
500 float m_flSequenceEnd;
501 float m_flSequenceSpeed;
502 vector m_vecSequenceAngle;
503 int m_iSequenceFlags;
504 movementState_t m_iMoveState;
505 string m_strSequenceKillTarget;
506
507 int m_iTriggerCondition;
508 string m_strTriggerTarget;
509
510 /* model events */
511 float m_flBaseTime;
512
513 /* attack/alliance system */
514 entity m_eEnemy;
515 float m_flAttackThink;
516 monsterState_t m_iMState;
517 monsterState_t m_iOldMState;
518 vector m_vecLKPos; /* last-known pos */
519
520 /* see/hear subsystem */
521 float m_flSeeTime;
522 /* animation cycles */
523 float m_flAnimTime;
524
525 /* timer for keeping track of the target */
526 float m_flTrackingTime;
527
529
530 /* caching variables, don't save these */
531 float m_actIdle;
532 bool m_bTurning;
533 float m_flIdleNext;
534 float _m_flMeleeAttempts;
535 float _m_flMeleeDelay;
536 float _m_flBurstCount;
537 bool _m_bShouldThrow;
538 bool _m_bStartDead;
539 float _m_flFrame;
540
541 /* save these please */
542 float _m_flReloadTracker;
543 bool m_bWeaponDrawn;
544
545 /* entityDef related */
546 float m_flEyeHeight;
547 string m_sndSight;
548 string m_sndIdle;
549 float m_flIdleMin;
550 float m_flIdleMax;
551 string m_sndFootstep;
552 string m_sndChatter;
553 string m_sndChatterCombat;
554 string m_sndPain;
555
556 string m_sndMeleeAttack;
557 string m_sndMeleeAttackHit;
558 string m_sndMeleeAttackMiss;
559
560 string m_sndDeath;
561 string m_sndThud;
562
563 /* attack definitions, if defined will fire projectiles */
564 string m_defSpecial1;
565 float m_flSpecial1Range;
566 string m_defSpecial2;
567 float m_flSpecial2Range;
568 string m_defRanged1;
569 float m_flRanged1Range;
570 string m_defRanged2;
571 float m_flRanged2Range;
572
573 /* ranged1 only */
574 int m_iNumProjectiles;
575 float m_flProjectileDelay;
576 float m_flProjectileSpread;
577
578 /* general */
579 float m_flAttackCone;
580 float m_flAttackAccuracy;
581
582 /* melee attack */
583 string m_defMelee;
584 float m_flMeleeRange;
585
586 string m_sndRangedAttack;
587 float m_flReloadCount;
588 float m_flReloadDelay;
589 string m_sndReload;
590 float m_flReserveAmmo;
591
592 string m_sndRangedAttack2;
593
594 bool m_bWeaponStartsDrawn;
595 string m_strBodyOnDraw;
596
597 float m_flWalkSpeed;
598 float m_flRunSpeed;
599
600 float m_flLeapDamage;
601 bool m_bLeapAttacked;
602 float m_flForceSequence;
603 float m_flSkin;
604 bool m_bGagged;
605
606 nonvirtual void _LerpTurnToEnemy(void);
607 nonvirtual void _LerpTurnToPos(vector);
608 nonvirtual void _LerpTurnToYaw(vector);
609 virtual void _Alerted(void);
610 nonvirtual void _ChaseAfterSpawn(void);
611#endif
612};
613
614#ifdef CLIENT
615string Sentences_GetSamples(string);
616string Sentences_ProcessSample(string);
617#endif
618
619#ifdef SERVER
620void NSMonster_AlertEnemyAlliance(vector pos, float radius, int alliance);
621entity NSMonster_FindClosestPlayer(entity);
622#endif
623
movementState_t
Movement states.
Definition: NSMonster.h:213
@ MOVESTATE_WALK
Definition: NSMonster.h:215
@ MOVESTATE_RUN
Definition: NSMonster.h:216
@ MOVESTATE_IDLE
Definition: NSMonster.h:214
float bonecontrol4
Definition: NSMonster.h:631
entity NSMonster_FindClosestPlayer(entity)
Definition: NSMonster.qc:2339
float baseframe2
Definition: NSMonster.h:624
allianceState_t
Alliance states.
Definition: NSMonster.h:203
@ MAL_FRIEND
1, friendly towards the player
Definition: NSMonster.h:204
@ MAL_ALIEN
3, unfriendly towards anyone but themselves
Definition: NSMonster.h:206
@ MAL_ROGUE
4, no allies, not even amongst themselves
Definition: NSMonster.h:207
@ MAL_NEUTRAL
5, neutral - will not attack, will not be attacked
Definition: NSMonster.h:208
@ MAL_ENEMY
2, unfriendly towards the player
Definition: NSMonster.h:205
float baselerpfrac
Definition: NSMonster.h:627
float bonecontrol2
Definition: NSMonster.h:629
float bonecontrol1
Definition: NSMonster.h:628
float subblendfrac
Definition: NSMonster.h:633
var bool autocvar_ai_debugLogic
Definition: NSMonster.h:17
void NSMonster_AlertEnemyAlliance(vector pos, float radius, int alliance)
Definition: NSMonster.qc:2278
float baseframe1time
Definition: NSMonster.h:625
float baseframe2time
Definition: NSMonster.h:626
string Sentences_ProcessSample(string)
Definition: sentences.qc:127
sequenceState_t
Scripted sequence states.
Definition: NSMonster.h:194
@ SEQUENCESTATE_ACTIVE
Definition: NSMonster.h:197
@ SEQUENCESTATE_IDLE
Definition: NSMonster.h:196
@ SEQUENCESTATE_ENDING
Definition: NSMonster.h:198
@ SEQUENCESTATE_NONE
Definition: NSMonster.h:195
int m_iAlliance
Definition: NSMonster.h:241
monsterState_t
Behaviour states.
Definition: NSMonster.h:182
@ MONSTER_CHASING
Definition: NSMonster.h:186
@ MONSTER_GIBBED
Definition: NSMonster.h:189
@ MONSTER_AIMING
Definition: NSMonster.h:187
@ MONSTER_FOLLOWING
Definition: NSMonster.h:185
@ MONSTER_ALERT
Definition: NSMonster.h:184
@ MONSTER_IDLE
Definition: NSMonster.h:183
@ MONSTER_DEAD
Definition: NSMonster.h:188
monster_activity_t
List of supported ACT types.
Definition: NSMonster.h:62
@ ACT_LEAP
Definition: NSMonster.h:71
@ ACT_DIEBACKWARD
Definition: NSMonster.h:100
@ ACT_LAND
Definition: NSMonster.h:73
@ ACT_SWIM
Definition: NSMonster.h:69
@ ACT_SNIFF
Definition: NSMonster.h:118
@ ACT_BARNACLE_PULL
Definition: NSMonster.h:104
@ ACT_ROLL_LEFT
Definition: NSMonster.h:76
@ ACT_TWITCH
Definition: NSMonster.h:87
@ ACT_FALL
Definition: NSMonster.h:72
@ ACT_WALK_SCARED
Definition: NSMonster.h:126
@ ACT_RUN
Definition: NSMonster.h:67
@ ACT_RANGE_ATTACK1
Definition: NSMonster.h:91
@ ACT_SIGNAL2
Definition: NSMonster.h:85
@ ACT_SMALL_FLINCH
Definition: NSMonster.h:89
@ ACT_RESET
Definition: NSMonster.h:63
@ ACT_IDLE_ANGRY
Definition: NSMonster.h:110
@ ACT_DIE_CHESTSHOT
Definition: NSMonster.h:130
@ ACT_MELEE_ATTACK1
Definition: NSMonster.h:93
@ ACT_DISARM
Definition: NSMonster.h:97
@ ACT_BARNACLE_CHEW
Definition: NSMonster.h:106
@ ACT_FLINCH_LEFTARM
Definition: NSMonster.h:136
@ ACT_FLINCH_STOMACH
Definition: NSMonster.h:135
@ ACT_FLINCH_RIGHTLEG
Definition: NSMonster.h:139
@ ACT_FLINCH_CHEST
Definition: NSMonster.h:134
@ ACT_MELEE_ATTACK2
Definition: NSMonster.h:94
@ ACT_HOP
Definition: NSMonster.h:70
@ ACT_BITE
Definition: NSMonster.h:119
@ ACT_FEAR_DISPLAY
Definition: NSMonster.h:121
@ ACT_RUN_SCARED
Definition: NSMonster.h:127
@ ACT_WALK
Definition: NSMonster.h:66
@ ACT_TURN_RIGHT
Definition: NSMonster.h:79
@ ACT_ROLL_RIGHT
Definition: NSMonster.h:77
@ ACT_FLY
Definition: NSMonster.h:68
@ ACT_CROUCHIDLE
Definition: NSMonster.h:81
@ ACT_VICTORY_DANCE
Definition: NSMonster.h:128
@ ACT_WALK_HURT
Definition: NSMonster.h:111
@ ACT_RUN_HURT
Definition: NSMonster.h:112
@ ACT_COMBAT_IDLE
Definition: NSMonster.h:125
@ ACT_STRAFE_RIGHT
Definition: NSMonster.h:75
@ ACT_DIEFORWARD
Definition: NSMonster.h:101
@ ACT_SPECIAL_ATTACK1
Definition: NSMonster.h:123
@ ACT_FLY_LEFT
Definition: NSMonster.h:115
@ ACT_DETECT_SCENT
Definition: NSMonster.h:117
@ ACT_IDLE
Definition: NSMonster.h:64
@ ACT_HOVER
Definition: NSMonster.h:113
@ ACT_SIGNAL3
Definition: NSMonster.h:86
@ ACT_EXCITED
Definition: NSMonster.h:122
@ ACT_STRAFE_LEFT
Definition: NSMonster.h:74
@ ACT_STAND
Definition: NSMonster.h:82
@ ACT_USE
Definition: NSMonster.h:83
@ ACT_CROUCH
Definition: NSMonster.h:80
@ ACT_COWER
Definition: NSMonster.h:88
@ ACT_FLY_RIGHT
Definition: NSMonster.h:116
@ ACT_GUARD
Definition: NSMonster.h:65
@ ACT_TURN_LEFT
Definition: NSMonster.h:78
@ ACT_THREAT_DISPLAY
Definition: NSMonster.h:120
@ ACT_SPECIAL_ATTACK2
Definition: NSMonster.h:124
@ ACT_DIE_HEADSHOT
Definition: NSMonster.h:129
@ ACT_INSPECT_WALL
Definition: NSMonster.h:109
@ ACT_SIGNAL1
Definition: NSMonster.h:84
@ ACT_GLIDE
Definition: NSMonster.h:114
@ ACT_FLINCH_RIGHTARM
Definition: NSMonster.h:137
@ ACT_DIEVIOLENT
Definition: NSMonster.h:102
@ ACT_DIE_GUTSHOT
Definition: NSMonster.h:131
@ ACT_SLEEP
Definition: NSMonster.h:107
@ ACT_DIE_BACKSHOT
Definition: NSMonster.h:132
@ ACT_ARM
Definition: NSMonster.h:96
@ ACT_BARNACLE_CHOMP
Definition: NSMonster.h:105
@ ACT_RANGE_ATTACK2
Definition: NSMonster.h:92
@ ACT_INSPECT_FLOOR
Definition: NSMonster.h:108
@ ACT_DIESIMPLE
Definition: NSMonster.h:99
@ ACT_BIG_FLINCH
Definition: NSMonster.h:90
@ ACT_FLINCH_HEAD
Definition: NSMonster.h:133
@ ACT_FLINCH_LEFTLEG
Definition: NSMonster.h:138
@ ACT_RELOAD
Definition: NSMonster.h:95
@ ACT_BARNACLE_HIT
Definition: NSMonster.h:103
@ ACT_EAT
Definition: NSMonster.h:98
float bonecontrol3
Definition: NSMonster.h:630
void _NSMonster_Log(string className, string functionName, float edictNum, string warnMessage)
Definition: NSMonster.h:19
float basesubblendfrac
Definition: NSMonster.h:635
float subblend2frac
Definition: NSMonster.h:634
triggerCondition_t
These numerations involve the m_iTriggerCondition attribute.
Definition: NSMonster.h:224
@ MTRIG_SQUADMEMBERDEAD
6, a squad member died
Definition: NSMonster.h:230
@ MTRIG_SEEPLAYER_RELAXED
12, we see a player and we're currently attacking anything
Definition: NSMonster.h:236
@ MTRIG_HALFHEALTH
4, lost half of our base_health
Definition: NSMonster.h:228
@ MTRIG_DEATH
5, we have died.
Definition: NSMonster.h:229
@ MTRIG_PAIN
3, taken damage
Definition: NSMonster.h:227
@ MTRIG_SEEPLAYER_ANGRY
2, we see an enemy player, that we want to harm
Definition: NSMonster.h:226
@ MTRIG_HEARENEMYPLAYER
9, we hear a player we are enemies with
Definition: NSMonster.h:233
@ MTRIG_SQUADLEADERDEAD
7, the squad leader died
Definition: NSMonster.h:231
@ MTRIG_HEARNOISE
8, we hear some noise around the world.
Definition: NSMonster.h:232
@ MTRIG_HEARWEAPONS
10, we hear weapons being fired
Definition: NSMonster.h:234
@ MTRIG_SEEPLAYER
11, we see a player, don't have to be angry at him.
Definition: NSMonster.h:235
@ MTRIG_NONE
1, nothing
Definition: NSMonster.h:225
string Sentences_GetSamples(string)
Definition: sentences.qc:240
float bonecontrol5
Definition: NSMonster.h:632
float basesubblend2frac
Definition: NSMonster.h:636
typedef enumflags
Bitfield enumeration for NSMonster its SendFlags field.
Definition: NSMonster.h:34
triggermode_t
The type of trigger activation.
Definition: NSTrigger.h:40
This entity class represents an object with choreographed/free-form movement.
Definition: NSNavAI.h:50
This entity class represents non-player characters.
Definition: NSMonster.h:325
virtual bool MeleeCondition(void)
Returns whether or not we should attempt a melee attack.
Definition: NSMonster.qc:570
virtual bool IsAlive(void)
Returns if they're considered alive.
Definition: NSMonster.qc:1359
virtual void TriggerTargets(void)
Call to trigger their targets manually.
Definition: NSMonster.qc:105
virtual void Save(float)
Handles saving a copy of this entity to a given filehandle.
Definition: NSMonster.qc:117
virtual void WalkRoute(void)
Internal use only.
Definition: NSMonster.qc:1242
nonvirtual void ActPlay(float)
Call to play an ACT on the given NSMonster.
Definition: NSMonster.qc:476
virtual void HasBeenKilled(void)
Overridable: Called once, when the monster has died.
Definition: NSMonster.qc:1652
virtual void EvaluateEntity(void)
Run each tic after physics are run to determine if we need to send updates over the network.
Definition: NSMonster.qc:2059
virtual bool IsOnRoute(void)
Returns TRUE if the monster is currently on route to a position.
Definition: NSMonster.qc:640
virtual float GetChaseSpeed(void)
Overridable: Returns the chase speed in Quake units per second.
Definition: NSMonster.qc:764
nonvirtual bool InSequence(void)
Returns if they're currently in a scripted sequence.
Definition: NSMonster.qc:1417
virtual void Restore(string, string)
Similar to NSIO::SpawnKey but for save-game fields.
Definition: NSMonster.qc:203
virtual void AlertNoise(void)
Overridable: Called when this monster gets 'alerted' to something new.
Definition: NSMonster.qc:538
virtual void HasBeenGibbed(void)
Definition: NSMonster.qc:1658
nonvirtual monsterState_t GetState(void)
Returns the current state of this NSMonster.
Definition: NSMonster.qc:1405
virtual float MeleeMaxDistance(void)
Overridable: Returns the distance in qu of what'll be a successfull melee attack.
Definition: NSMonster.qc:563
virtual void RouteEnded(void)
Internal use only.
Definition: NSMonster.qc:1217
virtual void FreeStateMoved(void)
Internal use only.
Definition: NSMonster.qc:1190
nonvirtual void AnimReset(void)
Definition: NSMonster.qc:489
virtual void Trigger(entity, triggermode_t)
Called whenever we're legacy triggered by another object or function.
Definition: NSMonster.qc:1882
virtual void Touch(entity)
Called whenever we're touching another entity.
Definition: NSMonster.qc:1527
virtual float SeeFOV(void)
Overridable: Returns the field of view in degrees.
Definition: NSMonster.qc:576
nonvirtual int GetSequenceState(void)
Returns the type of sequence they're currently in.
Definition: NSMonster.qc:1411
nonvirtual void SetState(monsterState_t)
Sets the current state of this NSMonster.
Definition: NSMonster.qc:1394
virtual float GetWalkSpeed(void)
Overridable: Returns the walking speed in Quake units per second.
Definition: NSMonster.qc:758
virtual void FallNoise(void)
Overridable: Called when they start falling.
Definition: NSMonster.qc:519
virtual float predraw(void)
virtual bool IsFriend(int)
Returns whether they are allied with the type in question.
Definition: NSMonster.qc:548
nonvirtual bool IsValidEnemy(entity)
Returns TRUE if 'enemy' should be considered a valid target for killing.
Definition: NSMonster.qc:616
virtual void HasBeenHit(void)
Overridable: Called every time the monster is hurt, while still alive.
Definition: NSMonster.qc:1574
virtual void Input(entity, string, string)
Called when we are being prompted by another object/function with an input message.
Definition: NSMonster.qc:1857
virtual void SeeThink(void)
Internal use only.
Definition: NSMonster.qc:659
virtual void ReceiveEntity(float, float)
Client: Handles network updates from the server for the associated entity.
virtual void Physics(void)
Definition: NSMonster.qc:1431
virtual float FramegroupForAct(float)
Overridable: Returns which framegroup to play for a given ACT.
Definition: NSMonster.qc:469
virtual void Sound(string)
Definition: NSMonster.qc:501
virtual void FreeState(void)
Internal use only.
Definition: NSMonster.qc:1133
virtual void AttackDraw(void)
Overridable: Called when they're drawing a weapon.
Definition: NSMonster.qc:1107
virtual void AnimPlay(float)
Call to play a single animation onto it, which cannot be interrupted by movement.
Definition: NSMonster.qc:482
virtual float GetYawSpeed(void)
Overridable: Returns the turning speed in euler-angle units per second.
Definition: NSMonster.qc:776
virtual void FreeStateDead(void)
Internal use only.
Definition: NSMonster.qc:1201
virtual int AnimWalk(void)
DEPRECATED, Overridable: Called when we need to play a fresh walking framegroup.
Definition: NSMonster.qc:456
virtual float SendEntity(entity, float)
Called by the engine whenever we need to send a client an update about this entity.
Definition: NSMonster.qc:2104
virtual void Death(entity, entity, int, vector, int)
Called when the health is equal or below 0.
Definition: NSMonster.qc:1676
virtual void StateChanged(monsterState_t, monsterState_t)
Called whenever the state of this NSMonster changes.
Definition: NSMonster.qc:1368
virtual void AttackHolster(void)
Overridable: Called when they're holstering a weapon.
Definition: NSMonster.qc:1125
virtual void SpawnKey(string, string)
This method handles entity key/value pairs on map load.
Definition: NSMonster.qc:1895
virtual void RunAI(void)
Internal use only.
Definition: NSMonster.qc:1423
virtual void Gib(void)
Definition: NSMonster.qc:507
virtual void Respawn(void)
Server: Called when the entity first spawns or when game-logic requests the entity to return to its o...
Definition: NSMonster.qc:1785
virtual float GetRunSpeed(void)
Overridable: Returns the running speed in Quake units per second.
Definition: NSMonster.qc:770
nonvirtual bool InAnimation(void)
Returns if we're currently in a forced animation sequence.
Definition: NSMonster.qc:495
virtual void AnimationUpdate(void)
Internal use only.
Definition: NSMonster.qc:1293
virtual void IdleNoise(void)
Overridable: Called after a while when they've got nothing to do.
Definition: NSMonster.qc:524
virtual int AttackMelee(void)
Overridable: Called when attempting to melee attack.
Definition: NSMonster.qc:902
virtual void customphysics(void)
overrides
nonvirtual int GetTriggerCondition(void)
Returns the condition under which they'll trigger their targets.
Definition: NSMonster.qc:99
void NSMonster(void)
Definition: NSMonster.qc:21
virtual void AlertNearby(void)
FIXME: Same as WarnAllies/StartleAllies? WTF?
Definition: NSMonster.qc:582
virtual void HasBeenAlerted(void)
Definition: NSMonster.qc:1664
virtual int AnimIdle(void)
DEPRECATED, Overridable: Called when we need to play a fresh idle framegroup.
Definition: NSMonster.qc:450
virtual int AttackRanged(void)
Overridable: Called when attempting to attack from a distance.
Definition: NSMonster.qc:954
virtual void Pain(entity, entity, int, vector, int)
Called whenever the entity receives damage.
Definition: NSMonster.qc:1580
virtual void AttackThink(void)
Overridable: Called when aiming their weapon.
Definition: NSMonster.qc:847
virtual int AnimRun(void)
DEPRECATED, Overridable: Called when we need to play a fresh running framegroup.
Definition: NSMonster.qc:462
virtual void Spawned(void)
Called when the entity is fulled initialized.
Definition: NSMonster.qc:1766
var bool autocvar_g_logTimestamps
Definition: global.h:17
#define printf(...)
Definition: global.h:30
vector view_ofs
Definition: pmove.h:20
#define PREDICTED_FLOAT_N(x)
Definition: defs.h:41
#define PREDICTED_FLOAT(x)
Definition: defs.h:34
#define PREDICTED_VECTOR_N(x)
Definition: defs.h:42