1 #ifdef REGISTER_MONSTER
3 /* MON_##id */ STINGRAY,
4 /* function */ m_stingray,
5 /* spawnflags */ MONSTER_TYPE_SWIM | MONSTER_SIZE_BROKEN | MON_FLAG_MELEE | MON_FLAG_MUTATORBLOCKED,
6 /* mins,maxs */ '-20 -20 -31', '20 20 20',
7 /* model */ "fish.mdl",
8 /* netname */ "stingray",
9 /* fullname */ _("Stingray")
12 #define STINGRAY_SETTINGS(monster) \
13 MON_ADD_CVAR(monster, health) \
14 MON_ADD_CVAR(monster, attack_bite_damage) \
15 MON_ADD_CVAR(monster, attack_bite_delay) \
16 MON_ADD_CVAR(monster, speed_stop) \
17 MON_ADD_CVAR(monster, speed_run) \
18 MON_ADD_CVAR(monster, speed_walk)
21 STINGRAY_SETTINGS(stingray)
25 const float stingray_anim_attack = 0;
26 const float stingray_anim_death = 1;
27 const float stingray_anim_swim = 2;
28 const float stingray_anim_pain = 3;
30 float stingray_attack(float attack_type)
34 case MONSTER_ATTACK_MELEE:
36 return monster_melee(self.enemy, MON_CVAR(stingray, attack_bite_damage), stingray_anim_attack, self.attack_range, MON_CVAR(stingray, attack_bite_delay), DEATH_MONSTER_STINGRAY, FALSE);
38 case MONSTER_ATTACK_RANGED:
40 // no ranged attack for stingray (yet?)
48 void spawnfunc_monster_stingray()
50 self.classname = "monster_stingray";
52 self.monster_spawnfunc = spawnfunc_monster_stingray;
54 if(Monster_CheckAppearFlags(self))
57 if not(monster_initialize(MON_STINGRAY, TRUE)) { remove(self); return; }
60 float m_stingray(float req)
66 monster_move(MON_CVAR(stingray, speed_run), MON_CVAR(stingray, speed_walk), MON_CVAR(stingray, speed_stop), stingray_anim_swim, stingray_anim_swim, stingray_anim_swim);
71 self.frame = stingray_anim_death;
76 if not(self.health) self.health = MON_CVAR(stingray, health);
78 self.monster_loot = spawnfunc_item_health_small;
79 self.monster_attackfunc = stingray_attack;
80 self.frame = stingray_anim_swim;
86 precache_model ("models/monsters/fish.mdl");
91 MON_CONFIG_SETTINGS(STINGRAY_SETTINGS(stingray))
101 float m_stingray(float req)
107 precache_model ("models/monsters/fish.mdl");
116 #endif // REGISTER_MONSTER