]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monster/wyvern.qc
Merge branch 'master' into terencehill/menu_weaponarena_selection_fix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monster / wyvern.qc
index b6736caa4aeaf535dd7e61f7de4bf73a048fb793..849abc36c395dd9ed4bec60788fd64027176b9eb 100644 (file)
@@ -1,15 +1,19 @@
-#ifdef REGISTER_MONSTER
-REGISTER_MONSTER(
+#ifndef MENUQC
+bool m_wyvern(int);
+#endif
+REGISTER_MONSTER_SIMPLE(
 /* MON_##id   */ WYVERN,
-/* function   */ m_wyvern,
 /* spawnflags */ MONSTER_TYPE_FLY | MONSTER_SIZE_BROKEN | MON_FLAG_RANGED,
 /* mins,maxs  */ '-20 -20 -58', '20 20 20',
 /* model      */ "wizard.mdl",
 /* netname    */ "wyvern",
 /* fullname   */ _("Wyvern")
-);
+) {
+#ifndef MENUQC
+       this.monster_func = m_wyvern;
+#endif
+}
 
-#else
 #ifdef SVQC
 float autocvar_g_monster_wyvern_health;
 float autocvar_g_monster_wyvern_attack_fireball_damage;
@@ -33,7 +37,7 @@ void wyvern_fireball_explode()
        entity e;
        if(self)
        {
-               pointparticles(particleeffectnum("fireball_explode"), self.origin, '0 0 0', 1);
+               Send_Effect("fireball_explode", self.origin, '0 0 0', 1);
 
                RadiusDamage(self, self.realowner, (autocvar_g_monster_wyvern_attack_fireball_damage), (autocvar_g_monster_wyvern_attack_fireball_edgedamage), (autocvar_g_monster_wyvern_attack_fireball_force), world, world, (autocvar_g_monster_wyvern_attack_fireball_radius), self.projectiledeathtype, world);
 
@@ -96,7 +100,7 @@ void spawnfunc_monster_wyvern()
 {
        self.classname = "monster_wyvern";
 
-       if(!monster_initialize(MON_WYVERN)) { remove(self); return; }
+       if(!monster_initialize(MON_WYVERN.monsterid)) { remove(self); return; }
 }
 
 // compatibility with old spawns
@@ -155,4 +159,3 @@ float m_wyvern(float req)
 }
 
 #endif // CSQC
-#endif // REGISTER_MONSTER