#ifndef MONSTERS_ALL_C
#define MONSTERS_ALL_C
+string M_Model(string m_mdl)
+{
+ string output = strcat("models/monsters/", m_mdl);
+#ifdef SVQC
+ MUTATOR_CALLHOOK(MonsterModel, m_mdl, output);
+ return monster_model_output;
+#else
+ return output;
+#endif
+}
+
#include "all.qh"
#define IMPLEMENTATION
#include "monster.qh"
+string M_Model(string m_mdl);
+
REGISTRY(Monsters, BITS(4))
REGISTER_REGISTRY(RegisterMonsters)
const int MON_FIRST = 1;
#define MAGE_H
#ifndef MENUQC
-MODEL(MON_MAGE, "models/monsters/mage.dpm");
+MODEL(MON_MAGE, M_Model("mage.dpm"));
#endif
CLASS(Mage, Monster)
#define SHAMBLER_H
#ifndef MENUQC
-MODEL(MON_SHAMBLER, "models/monsters/shambler.mdl");
+MODEL(MON_SHAMBLER, M_Model("shambler.mdl"));
#endif
CLASS(Shambler, Monster)
#define SPIDER_H
#ifndef MENUQC
-MODEL(MON_SPIDER, "models/monsters/spider.dpm");
+MODEL(MON_SPIDER, M_Model("spider.dpm"));
#endif
CLASS(Spider, Monster)
#define WYVERN_H
#ifndef MENUQC
-MODEL(MON_WYVERN, "models/monsters/wizard.mdl");
+MODEL(MON_WYVERN, M_Model("wizard.mdl"));
#endif
CLASS(Wyvern, Monster)
#define ZOMBIE_H
#ifndef MENUQC
-MODEL(MON_ZOMBIE, "models/monsters/zombie.dpm");
+MODEL(MON_ZOMBIE, M_Model("zombie.dpm"));
#endif
CLASS(Zombie, Monster)
/**/ i(entity, frag_attacker) \
/**/
MUTATOR_HOOKABLE(PrepareExplosionByDamage, EV_PrepareExplosionByDamage);
+
+/** called when a monster model is about to be set, allows custom paths etc. */
+#define EV_MonsterModel(i, o) \
+ /**/ i(string, monster_model) \
+ /**/ i(string, monster_model_output) \
+ /**/ o(string, monster_model_output) \
+ /**/
+string monster_model;
+string monster_model_output;
+MUTATOR_HOOKABLE(MonsterModel, EV_MonsterModel);
#endif