19_NSMonster_Log(
string className,
string functionName,
float edictNum,
string warnMessage)
22 printf(
"^9%f ^5%s (%d) ^7: %s\n", time, functionName, edictNum, warnMessage);
24 printf(
"^5%s (%d) ^7: %s\n", functionName, edictNum, warnMessage);
26#define NSMonsterLog(...) if (autocvar_ai_debugLogic == true) _NSMonster_Log(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__))
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,
46 MONFL_CHANGED_SKINHEALTH,
47 MONFL_CHANGED_MOVETYPE,
48 MONFL_CHANGED_EFFECTS,
51 MONFL_CHANGED_VELOCITY,
52 MONFL_CHANGED_RENDERCOLOR,
53 MONFL_CHANGED_RENDERAMT,
54 MONFL_CHANGED_RENDERMODE,
177 SMSF_IGNOREPLAYERPUSH
178} sourceMonsterFlag_t;
331 virtual void Save(
float);
332 virtual void Restore(
string,
string);
335 virtual void Touch(entity);
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);
343 virtual void Gib(
void);
344 virtual void Sound(
string);
345 virtual void SpawnKey(
string,
string);
349 virtual void RunAI(
void);
374 virtual float SeeFOV(
void);
440 nonvirtual
void ActPlay(
float);
479 nonvirtual
void _RenderDebugViewCone();
489 vector oldnet_velocity;
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;
505 string m_strSequenceKillTarget;
507 int m_iTriggerCondition;
508 string m_strTriggerTarget;
515 float m_flAttackThink;
526 float m_flTrackingTime;
534 float _m_flMeleeAttempts;
535 float _m_flMeleeDelay;
536 float _m_flBurstCount;
537 bool _m_bShouldThrow;
542 float _m_flReloadTracker;
551 string m_sndFootstep;
553 string m_sndChatterCombat;
556 string m_sndMeleeAttack;
557 string m_sndMeleeAttackHit;
558 string m_sndMeleeAttackMiss;
564 string m_defSpecial1;
565 float m_flSpecial1Range;
566 string m_defSpecial2;
567 float m_flSpecial2Range;
569 float m_flRanged1Range;
571 float m_flRanged2Range;
574 int m_iNumProjectiles;
575 float m_flProjectileDelay;
576 float m_flProjectileSpread;
579 float m_flAttackCone;
580 float m_flAttackAccuracy;
584 float m_flMeleeRange;
586 string m_sndRangedAttack;
587 float m_flReloadCount;
588 float m_flReloadDelay;
590 float m_flReserveAmmo;
592 string m_sndRangedAttack2;
594 bool m_bWeaponStartsDrawn;
595 string m_strBodyOnDraw;
600 float m_flLeapDamage;
601 bool m_bLeapAttacked;
602 float m_flForceSequence;
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);
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