4 .entity monster_owner; // new monster owner entity, fixes non-solid monsters
5 .float monstercount; // per player monster count
7 .float stat_monsters_killed; // stats
8 .float stat_monsters_total;
10 float monsters_killed;
11 void monsters_setstatus(); // monsters.qc
12 .float monster_moveflags; // checks where to move when not attacking
14 .float spider_slowness; // special spider timer
16 void monster_remove(entity mon); // removes a monster
18 .float(float attack_type) monster_attackfunc;
19 const float MONSTER_ATTACK_MELEE = 1;
20 const float MONSTER_ATTACK_RANGED = 2;
23 const float MONSTER_SKILL_EASY = 1;
24 const float MONSTER_SKILL_MEDIUM = 3;
25 const float MONSTER_SKILL_HARD = 5;
26 const float MONSTER_SKILL_INSANE = 7;
27 const float MONSTER_SKILL_NIGHTMARE = 10;
29 .float fish_wasdrowning; // used to reset a drowning fish's angles if it reaches water again
35 .float spawn_time; // stop monster from moving around right after spawning
42 .float m_armor_blockpercent;
45 // copied from player sounds
46 .float msound_delay; // temporary antilag system
47 #define ALLMONSTERSOUNDS \
56 #define _MSOUND(m) .string monstersound_##m;
60 float GetMonsterSoundSampleField_notFound;
62 const float MONSTERSKILL_NOTEASY = 256; // monster will not spawn on skill <= 1
63 const float MONSTERSKILL_NOTMEDIUM = 512; // monster will not spawn on skill 2
64 const float MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill >= 3
67 const float MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
68 const float MONSTERFLAG_NORESPAWN = 4;
69 const float MONSTERFLAG_FLY_VERTICAL = 8; // fly/swim vertically
70 const float MONSTERFLAG_INFRONT = 32; // only check for enemies infront of us
71 const float MONSTERFLAG_MINIBOSS = 64; // monster spawns as mini-boss (also has a chance of naturally becoming one)
72 const float MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters
73 const float MONSTERFLAG_RESPAWNED = 32768; // flag for re-spawned monsters
75 .void() monster_spawnfunc;
77 .float monster_movestate; // used to tell what the monster is currently doing
78 const float MONSTER_MOVE_OWNER = 1; // monster will move to owner if in range, or stand still
79 const float MONSTER_MOVE_WANDER = 2; // monster will ignore owner & wander around
80 const float MONSTER_MOVE_SPAWNLOC = 3; // monster will move to its spawn location when not attacking
81 const float MONSTER_MOVE_NOMOVE = 4; // monster simply stands still
82 const float MONSTER_MOVE_ENEMY = 5; // used only as a movestate
84 const float MONSTER_STATE_ATTACK_LEAP = 1;
85 const float MONSTER_STATE_ATTACK_MELEE = 2;