4 const int MONSTER_RESPAWN_DEATHPOINT = 16; // re-spawn where we died
5 const int MONSTER_TYPE_FLY = 32;
6 const int MONSTER_TYPE_SWIM = 64;
7 const int MONSTER_SIZE_BROKEN = 128; // TODO: remove when bad models are replaced
8 const int MON_FLAG_SUPERMONSTER = 256; // incredibly powerful monster
9 const int MON_FLAG_RANGED = 512; // monster shoots projectiles
10 const int MON_FLAG_MELEE = 1024;
11 const int MON_FLAG_CRUSH = 2048; // monster can be stomped in special modes
12 const int MON_FLAG_RIDE = 4096; // monster can be ridden in special modes
13 const int MONSTER_SIZE_QUAKE = 8192;
15 // entity properties of monsterinfo:
16 .bool(int, entity actor, entity targ) monster_attackfunc;
19 .vector anim_blockend;
20 .vector anim_blockstart;
27 CLASS(Monster, Object)
28 ATTRIB(Monster, monsterid, int, 0);
30 ATTRIB(Monster, spawnflags, int, 0);
31 /** human readable name */
32 ATTRIB(Monster, monster_name, string, "Monster");
34 ATTRIB(Monster, netname, string, "");
36 ATTRIB(Monster, m_model, entity);
38 ATTRIB(Monster, mins, vector, '-0 -0 -0');
40 ATTRIB(Monster, maxs, vector, '0 0 0');
42 /** (SERVER) setup monster data */
43 METHOD(Monster, mr_setup, bool(Monster this, entity actor)) { TC(Monster, this); return false; }
44 /** (SERVER) logic to run every frame */
45 METHOD(Monster, mr_think, bool(Monster this, entity actor)) { TC(Monster, this); return false; }
46 /** (SERVER) called when monster dies */
47 METHOD(Monster, mr_death, bool(Monster this, entity actor)) { TC(Monster, this); return false; }
48 /** (BOTH) precaches models/sounds used by this monster */
49 METHOD(Monster, mr_precache, bool(Monster this)) { TC(Monster, this); return false; }
50 /** (SERVER) called when monster is damaged */
51 METHOD(Monster, mr_pain, float(Monster this, entity actor, float damage_take, entity attacker, float deathtype)) { TC(Monster, this); return damage_take; }
52 /** (BOTH?) sets animations for monster */
53 METHOD(Monster, mr_anim, bool(Monster this, entity actor)) { TC(Monster, this); return false; }
59 #include "sv_monsters.qh"
60 #include <server/g_damage.qh>
61 #include <server/bot/api.qh>
62 #include <server/weapons/common.qh>
63 #include <server/weapons/tracing.qh>
64 #include <server/weapons/weaponsystem.qh>
65 #include <common/mutators/mutator/waypoints/waypointsprites.qh>
66 #include <lib/warpzone/server.qh>
70 #include "../animdecide.qh"
72 vector animfixfps(entity e, vector a, vector b);