From: TimePath Date: Sat, 27 Aug 2016 02:04:27 +0000 (+1000) Subject: Monsters: fix compilation units X-Git-Tag: xonotic-v0.8.2~661 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c670ebcbf07409b87a5b169be1ed27d05aab2774;p=xonotic%2Fxonotic-data.pk3dir.git Monsters: fix compilation units --- diff --git a/qcsrc/common/monsters/all.qh b/qcsrc/common/monsters/all.qh index 89b5591b4..c9e5ad37b 100644 --- a/qcsrc/common/monsters/all.qh +++ b/qcsrc/common/monsters/all.qh @@ -1,7 +1,5 @@ #pragma once -#include "monster.qh" - string M_Model(string m_mdl); REGISTRY(Monsters, BITS(5)) @@ -13,4 +11,6 @@ const int MON_FIRST = 1; #define MON_LAST (Monsters_COUNT - 1) #define REGISTER_MONSTER(id, inst) REGISTER(Monsters, MON, id, monsterid, inst) +#include "monster.qh" + REGISTER_MONSTER(Null, NEW(Monster)); diff --git a/qcsrc/common/monsters/monster.qh b/qcsrc/common/monsters/monster.qh index 341b92e7b..babf6e4fa 100644 --- a/qcsrc/common/monsters/monster.qh +++ b/qcsrc/common/monsters/monster.qh @@ -1,22 +1,5 @@ #pragma once -#ifdef SVQC -#include "sv_monsters.qh" -#include -#include -#include -#include -#include -#include -#include -#endif - -#ifdef GAMEQC -#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; @@ -73,3 +56,21 @@ CLASS(Monster, Object) METHOD(Monster, mr_anim, bool(Monster this, entity actor)) { TC(Monster, this); return false; } ENDCLASS(Monster) + + +#ifdef SVQC +#include "sv_monsters.qh" +#include +#include +#include +#include +#include +#include +#include +#endif + +#ifdef GAMEQC +#include "../animdecide.qh" +#include "../anim.qh" +vector animfixfps(entity e, vector a, vector b); +#endif diff --git a/qcsrc/common/monsters/monster/mage.qh b/qcsrc/common/monsters/monster/mage.qh index 04826b39b..d78ee5ecf 100644 --- a/qcsrc/common/monsters/monster/mage.qh +++ b/qcsrc/common/monsters/monster/mage.qh @@ -1,5 +1,7 @@ #pragma once +#include "../all.qh" + #ifdef GAMEQC MODEL(MON_MAGE, M_Model("mage.dpm")); #endif diff --git a/qcsrc/common/monsters/monster/shambler.qh b/qcsrc/common/monsters/monster/shambler.qh index 0824b5587..f7a3ce3a9 100644 --- a/qcsrc/common/monsters/monster/shambler.qh +++ b/qcsrc/common/monsters/monster/shambler.qh @@ -1,5 +1,7 @@ #pragma once +#include "../all.qh" + #ifdef GAMEQC MODEL(MON_SHAMBLER, M_Model("shambler.mdl")); #endif diff --git a/qcsrc/common/monsters/monster/spider.qh b/qcsrc/common/monsters/monster/spider.qh index 1da750d4c..c54eb3a7a 100644 --- a/qcsrc/common/monsters/monster/spider.qh +++ b/qcsrc/common/monsters/monster/spider.qh @@ -1,5 +1,7 @@ #pragma once +#include "../all.qh" + #ifdef GAMEQC MODEL(MON_SPIDER, M_Model("spider.dpm")); #endif diff --git a/qcsrc/common/monsters/monster/wyvern.qh b/qcsrc/common/monsters/monster/wyvern.qh index 0982eb176..0af84c130 100644 --- a/qcsrc/common/monsters/monster/wyvern.qh +++ b/qcsrc/common/monsters/monster/wyvern.qh @@ -1,5 +1,7 @@ #pragma once +#include "../all.qh" + #ifdef GAMEQC MODEL(MON_WYVERN, M_Model("wizard.mdl")); #endif diff --git a/qcsrc/common/monsters/monster/zombie.qh b/qcsrc/common/monsters/monster/zombie.qh index c5e243c75..b52056e71 100644 --- a/qcsrc/common/monsters/monster/zombie.qh +++ b/qcsrc/common/monsters/monster/zombie.qh @@ -1,5 +1,7 @@ #pragma once +#include "../all.qh" + #ifdef GAMEQC MODEL(MON_ZOMBIE, M_Model("zombie.dpm")); #endif