1 #ifdef REGISTER_MONSTER
3 /* MON_##id */ STINGRAY,
4 /* function */ m_stingray,
5 /* mins,maxs */ '-20 -20 -31', '20 20 20',
6 /* model */ "fish.mdl",
7 /* netname */ "stingray",
8 /* fullname */ _("Stingray")
13 float autocvar_g_monster_stingray;
14 float autocvar_g_monster_stingray_health;
15 float autocvar_g_monster_stingray_damage;
16 float autocvar_g_monster_stingray_speed_walk;
17 float autocvar_g_monster_stingray_speed_run;
19 const float stingray_anim_attack = 0;
20 const float stingray_anim_death = 1;
21 const float stingray_anim_swim = 2;
22 const float stingray_anim_pain = 3;
24 float stingray_attack(float attack_type)
28 case MONSTER_ATTACK_MELEE:
30 monsters_setframe(stingray_anim_attack);
31 self.attack_finished_single = time + 0.5;
32 monster_melee(self.enemy, autocvar_g_monster_stingray_damage, 0.1, DEATH_MONSTER_STINGRAY, FALSE);
36 case MONSTER_ATTACK_RANGED:
42 void spawnfunc_monster_stingray()
44 if not(autocvar_g_monster_stingray) { remove(self); return; }
46 self.classname = "monster_stingray";
48 self.monster_spawnfunc = spawnfunc_monster_stingray;
50 if(Monster_CheckAppearFlags(self))
53 if not(monster_initialize(MON_STINGRAY, TRUE, MONSTER_TYPE_SWIM | MONSTER_SIZE_BROKEN)) { remove(self); return; }
56 float m_stingray(float req)
62 monster_move(autocvar_g_monster_stingray_speed_run, autocvar_g_monster_stingray_speed_walk, 10, stingray_anim_swim, stingray_anim_swim, stingray_anim_swim);
67 monsters_setframe(stingray_anim_death);
72 if not(self.health) self.health = autocvar_g_monster_stingray_health;
74 self.monster_attackfunc = stingray_attack;
75 monsters_setframe(stingray_anim_swim);
91 float m_stingray(float req)
102 precache_model ("models/monsters/fish.mdl");
111 #endif // REGISTER_MONSTER