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