7 #include "../util-pre.qh"
8 #include "../../server/sys-pre.qh"
9 #include "../../dpdefs/progsdefs.qh"
10 #include "../../dpdefs/dpextensions.qh"
11 #include "../../server/sys-post.qh"
12 #include "../../warpzonelib/anglestransform.qh"
13 #include "../../warpzonelib/mathlib.qh"
14 #include "../../warpzonelib/common.qh"
15 #include "../../warpzonelib/util_server.qh"
16 #include "../../warpzonelib/server.qh"
17 #include "../constants.qh"
18 #include "../stats.qh"
19 #include "../teams.qh"
21 #include "../nades.qh"
22 #include "../buffs.qh"
24 #include "../counting.qh"
25 #include "../urllib.qh"
26 #include "../command/markup.qh"
27 #include "../command/rpn.qh"
28 #include "../command/generic.qh"
29 #include "../command/shared_defs.qh"
30 #include "../net_notice.qh"
31 #include "../animdecide.qh"
32 #include "monsters.qh"
36 .float monster_attack;
38 .entity monster_owner; // new monster owner entity, fixes non-solid monsters
40 .float stat_monsters_killed; // stats
41 .float stat_monsters_total;
43 float monsters_killed;
44 void monsters_setstatus(); // monsters.qc
45 .float monster_moveflags; // checks where to move when not attacking
48 .float wander_distance;
50 .float monster_lifetime;
52 .float spider_slowness; // special spider timer
54 void monster_remove(entity mon); // removes a monster
56 .float(float attack_type) monster_attackfunc;
57 const int MONSTER_ATTACK_MELEE = 1;
58 const int MONSTER_ATTACK_RANGED = 2;
61 const float MONSTER_SKILL_EASY = 1;
62 const float MONSTER_SKILL_MEDIUM = 3;
63 const float MONSTER_SKILL_HARD = 5;
64 const float MONSTER_SKILL_INSANE = 7;
65 const float MONSTER_SKILL_NIGHTMARE = 10;
67 .float fish_wasdrowning; // used to reset a drowning fish's angles if it reaches water again
73 .float spawn_time; // stop monster from moving around right after spawning
80 .float m_armor_blockpercent;
83 // copied from player sounds
84 .float msound_delay; // temporary antilag system
85 #define ALLMONSTERSOUNDS \
94 #define _MSOUND(m) .string monstersound_##m;
98 float GetMonsterSoundSampleField_notFound;
100 const int MONSTERSKILL_NOTEASY = 256; // monster will not spawn on skill <= 1
101 const int MONSTERSKILL_NOTMEDIUM = 512; // monster will not spawn on skill 2
102 const int MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill >= 3
105 const int MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
106 const int MONSTERFLAG_NORESPAWN = 4;
107 const int MONSTERFLAG_FLY_VERTICAL = 8; // fly/swim vertically
108 const int MONSTERFLAG_INFRONT = 32; // only check for enemies infront of us
109 const int MONSTERFLAG_MINIBOSS = 64; // monster spawns as mini-boss (also has a chance of naturally becoming one)
110 const int MONSTERFLAG_INVINCIBLE = 128; // monster doesn't take damage (may be used for map objects & temporary monsters)
111 const int MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters
112 const int MONSTERFLAG_RESPAWNED = 32768; // flag for re-spawned monsters
114 .int monster_movestate; // used to tell what the monster is currently doing
115 const int MONSTER_MOVE_OWNER = 1; // monster will move to owner if in range, or stand still
116 const int MONSTER_MOVE_WANDER = 2; // monster will ignore owner & wander around
117 const int MONSTER_MOVE_SPAWNLOC = 3; // monster will move to its spawn location when not attacking
118 const int MONSTER_MOVE_NOMOVE = 4; // monster simply stands still
119 const int MONSTER_MOVE_ENEMY = 5; // used only as a movestate
121 const int MONSTER_STATE_ATTACK_LEAP = 1;
122 const int MONSTER_STATE_ATTACK_MELEE = 2;