float autocvar_g_monster_wyvern_speed_run;
float autocvar_g_monster_wyvern_speed_walk;
-const float wyvern_anim_hover = 0;
-const float wyvern_anim_fly = 1;
-const float wyvern_anim_magic = 2;
-const float wyvern_anim_pain = 3;
-const float wyvern_anim_death = 4;
+const float wyvern_anim_hover = 0;
+const float wyvern_anim_fly = 1;
+const float wyvern_anim_magic = 2;
+const float wyvern_anim_pain = 3;
+const float wyvern_anim_death = 4;
void wyvern_fireball_explode()
{
if(self)
{
pointparticles(particleeffectnum("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, (autocvar_g_monster_wyvern_attack_fireball_radius), self.projectiledeathtype, world);
-
+
for(e = world; (e = findfloat(e, takedamage, DAMAGE_AIM)); ) if(vlen(e.origin - self.origin) <= (autocvar_g_monster_wyvern_attack_fireball_radius))
Fire_AddDamage(e, self, 5 * Monster_SkillModifier(), (autocvar_g_monster_wyvern_attack_fireball_damagetime), self.projectiledeathtype);
-
+
remove(self);
}
}
void wyvern_fireball_touch()
{
PROJECTILE_TOUCH;
-
+
wyvern_fireball_explode();
}
{
entity missile = spawn();
vector dir = normalize((self.enemy.origin + '0 0 10') - self.origin);
-
+
monster_makevectors(self.enemy);
missile.owner = missile.realowner = self;
missile.solid = SOLID_TRIGGER;
missile.movetype = MOVETYPE_FLYMISSILE;
missile.projectiledeathtype = DEATH_MONSTER_WYVERN;
- setsize(missile, '-6 -6 -6', '6 6 6');
+ setsize(missile, '-6 -6 -6', '6 6 6');
setorigin(missile, self.origin + self.view_ofs + v_forward * 14);
missile.flags = FL_PROJECTILE;
missile.velocity = dir * (autocvar_g_monster_wyvern_attack_fireball_speed);
case MONSTER_ATTACK_RANGED:
{
self.attack_finished_single = time + 1.2;
-
+
wyvern_fireball();
-
+
return TRUE;
}
}
-
+
return FALSE;
}
void spawnfunc_monster_wyvern()
{
self.classname = "monster_wyvern";
-
- self.monster_spawnfunc = spawnfunc_monster_wyvern;
-
- if(Monster_CheckAppearFlags(self))
- return;
-
- if not(monster_initialize(MON_WYVERN, TRUE)) { remove(self); return; }
+
+ if(!monster_initialize(MON_WYVERN)) { remove(self); return; }
}
// compatibility with old spawns
}
case MR_SETUP:
{
- if not(self.health) self.health = (autocvar_g_monster_wyvern_health);
-
+ if(!self.health) self.health = (autocvar_g_monster_wyvern_health);
+
self.monster_loot = spawnfunc_item_cells;
self.monster_attackfunc = wyvern_attack;
self.frame = wyvern_anim_hover;
-
+
return TRUE;
}
case MR_PRECACHE:
{
- precache_model ("models/monsters/wizard.mdl");
+ precache_model("models/monsters/wizard.mdl");
return TRUE;
}
}
-
+
return TRUE;
}
{
case MR_PRECACHE:
{
- precache_model ("models/monsters/wizard.mdl");
return TRUE;
}
}
-
+
return TRUE;
}