5 const int MONSTER_RESPAWN_DEATHPOINT = 16; // re-spawn where we died
6 const int MONSTER_TYPE_FLY = 32;
7 const int MONSTER_TYPE_SWIM = 64;
8 const int MONSTER_SIZE_BROKEN = 128; // TODO: remove when bad models are replaced
9 const int MON_FLAG_SUPERMONSTER = 256; // incredibly powerful monster
10 const int MON_FLAG_RANGED = 512; // monster shoots projectiles
11 const int MON_FLAG_MELEE = 1024;
12 const int MON_FLAG_CRUSH = 2048; // monster can be stomped in special modes
13 const int MON_FLAG_RIDE = 4096; // monster can be ridden in special modes
15 // entity properties of monsterinfo:
16 .bool(int, entity targ) monster_attackfunc;
19 .vector anim_blockend;
20 .vector anim_blockstart;
30 /** If you register a new monster, make sure to add it to all.inc */
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, NULL)
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)) { return false; }
48 /** (SERVER) logic to run every frame */
49 METHOD(Monster, mr_think, bool(Monster this)) { return false; }
50 /** (SERVER) called when monster dies */
51 METHOD(Monster, mr_death, bool(Monster this)) { return false; }
52 /** (BOTH) precaches models/sounds used by this monster */
53 METHOD(Monster, mr_precache, bool(Monster this)) { return false; }
54 /** (SERVER) called when monster is damaged */
55 METHOD(Monster, mr_pain, bool(Monster this)) { return false; }
56 /** (BOTH?) sets animations for monster */
57 METHOD(Monster, mr_anim, bool(Monster this)) { return false; }