-#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;
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);
missile.think = wyvern_fireball_explode;
missile.enemy = self.enemy;
missile.touch = wyvern_fireball_touch;
- CSQCProjectile(missile, TRUE, PROJECTILE_FIREMINE, TRUE);
+ CSQCProjectile(missile, true, PROJECTILE_FIREMINE, true);
}
float wyvern_attack(float attack_type)
wyvern_fireball();
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
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
case MR_THINK:
{
monster_move((autocvar_g_monster_wyvern_speed_run), (autocvar_g_monster_wyvern_speed_walk), (autocvar_g_monster_wyvern_speed_stop), wyvern_anim_fly, wyvern_anim_hover, wyvern_anim_hover);
- return TRUE;
+ return true;
}
case MR_DEATH:
{
self.velocity_x = -200 + 400 * random();
self.velocity_y = -200 + 400 * random();
self.velocity_z = 100 + 100 * random();
- return TRUE;
+ return true;
}
case MR_SETUP:
{
self.monster_attackfunc = wyvern_attack;
self.frame = wyvern_anim_hover;
- return TRUE;
+ return true;
}
case MR_PRECACHE:
{
precache_model("models/monsters/wizard.mdl");
- return TRUE;
+ return true;
}
}
- return TRUE;
+ return true;
}
#endif // SVQC
{
case MR_PRECACHE:
{
- return TRUE;
+ return true;
}
}
- return TRUE;
+ return true;
}
#endif // CSQC
-#endif // REGISTER_MONSTER