]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monster.qh
Merge branch 'master' into Mario/fullbright_skins
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monster.qh
index 22e2072c08c630a6087591acd456b83c5930fce5..de24caa01a2ded2092bfd8689b2a4924f849fe4d 100644 (file)
 #include <lib/warpzone/server.qh>
 #endif
 
+#ifndef MENUQC
+#include "../animdecide.qh"
+#include "../anim.qh"
+vector animfixfps(entity e, vector a, vector b);
+#endif
+
 // special spawn flags
 const int MONSTER_RESPAWN_DEATHPOINT = 16; // re-spawn where we died
 const int MONSTER_TYPE_FLY = 32;
@@ -39,7 +45,6 @@ const int MONSTER_SIZE_QUAKE = 8192;
 .vector anim_walk;
 .vector anim_spawn;
 
-/** If you register a new monster, make sure to add it to all.inc */
 CLASS(Monster, Object)
     ATTRIB(Monster, monsterid, int, 0)
     /** attributes */
@@ -56,17 +61,17 @@ CLASS(Monster, Object)
     ATTRIB(Monster, maxs, vector, '0 0 0')
 
     /** (SERVER) setup monster data */
-    METHOD(Monster, mr_setup, bool(Monster this, entity actor)) { return false; }
+    METHOD(Monster, mr_setup, bool(Monster this, entity actor)) { TC(Monster, this); return false; }
     /** (SERVER) logic to run every frame */
-    METHOD(Monster, mr_think, bool(Monster this, entity actor)) { return false; }
+    METHOD(Monster, mr_think, bool(Monster this, entity actor)) { TC(Monster, this); return false; }
     /** (SERVER) called when monster dies */
-    METHOD(Monster, mr_death, bool(Monster this, entity actor)) { return false; }
+    METHOD(Monster, mr_death, bool(Monster this, entity actor)) { TC(Monster, this); return false; }
     /** (BOTH) precaches models/sounds used by this monster */
-    METHOD(Monster, mr_precache, bool(Monster this)) { return false; }
+    METHOD(Monster, mr_precache, bool(Monster this)) { TC(Monster, this); return false; }
     /** (SERVER) called when monster is damaged */
-    METHOD(Monster, mr_pain, bool(Monster this, entity actor)) { return false; }
+    METHOD(Monster, mr_pain, float(Monster this, entity actor, float damage_take, entity attacker, float deathtype)) { TC(Monster, this); return damage_take; }
     /** (BOTH?) sets animations for monster */
-    METHOD(Monster, mr_anim, bool(Monster this, entity actor)) { return false; }
+    METHOD(Monster, mr_anim, bool(Monster this, entity actor)) { TC(Monster, this); return false; }
 
 ENDCLASS(Monster)