]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monsters.qh
Don't reduce owner's monster count if the monster is re-spawning
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monsters.qh
index 0c9d4b88881ebb4230f974163497ab57d0933f63..d0f7a9ad31c9f315635eb847a5f706233405e861 100644 (file)
@@ -9,11 +9,13 @@
 entity get_monsterinfo(float id);
 
 // special spawn flags
-const float MONSTER_RESPAWN_DEATHPOINT = 128; // re-spawn where we died
-const float MONSTER_TYPE_FLY = 256;
-const float MONSTER_TYPE_SWIM = 512;
-const float MONSTER_SIZE_BROKEN = 1024; // TODO: remove when bad models are replaced
-const float MON_FLAG_SUPERMONSTER = 2048; // incredibly powerful monster
+const float MONSTER_RESPAWN_DEATHPOINT = 16; // re-spawn where we died
+const float MONSTER_TYPE_FLY = 32;
+const float MONSTER_TYPE_SWIM = 64;
+const float MONSTER_SIZE_BROKEN = 128; // TODO: remove when bad models are replaced
+const float MON_FLAG_SUPERMONSTER = 256; // incredibly powerful monster
+const float MON_FLAG_RANGED = 512; // monster shoots projectiles
+const float MON_FLAG_MELEE = 1024;
 
 // entity properties of monsterinfo:
 .float monsterid; // MON_...
@@ -23,17 +25,18 @@ const float MON_FLAG_SUPERMONSTER = 2048; // incredibly powerful monster
 .string mdl; // currently a copy of the model
 .string model; // full name of model
 .float spawnflags;
+.vector mins, maxs; // monster hitbox size
 
 // csqc linking
 #ifndef MENUQC
 .float anim_start_time;
 
-float MSF_UPDATE       = 2;
-float MSF_STATUS       = 4;
-float MSF_SETUP        = 8;
-float MSF_ANG          = 16;
-float MSF_MOVE         = 32;
-float MSF_ANIM         = 64;
+float MSF_UPDATE               = 2;
+float MSF_STATUS               = 4;
+float MSF_SETUP                        = 8;
+float MSF_ANG                  = 16;
+float MSF_MOVE                 = 32;
+float MSF_ANIM                 = 64;
 
 float MSF_FULL_UPDATE  = 16777215;
 #endif
@@ -65,8 +68,13 @@ float MON_LAST;
                register_monster(id,func,monsterflags,min_s,max_s,modelname,shortname,mname); \
        } \
        ACCUMULATE_FUNCTION(RegisterMonsters, RegisterMonsters_##id)
+#ifdef MENUQC
+#define REGISTER_MONSTER(id,func,monsterflags,min_s,max_s,modelname,shortname,mname) \
+       REGISTER_MONSTER_2(MON_##id,m_null,monsterflags,min_s,max_s,modelname,shortname,mname)
+#else
 #define REGISTER_MONSTER(id,func,monsterflags,min_s,max_s,modelname,shortname,mname) \
        REGISTER_MONSTER_2(MON_##id,func,monsterflags,min_s,max_s,modelname,shortname,mname)
+#endif
 
 #define MON_DUPECHECK(dupecheck,cvar) \
        #ifndef dupecheck \