newmine.mine_time = self.mine_time;
- newmine.touch = SUB_Null;
+ newmine.touch = func_null;
newmine.think = W_Mine_Think;
newmine.nextthink = time;
newmine.cnt = self.cnt;
if(IsFlying(other))
AnnounceTo(self.realowner, "airshot");
- self.event_damage = SUB_Null;
+ self.event_damage = func_null;
self.takedamage = DAMAGE_NO;
RadiusDamage (self, self.realowner, autocvar_g_balance_minelayer_damage, autocvar_g_balance_minelayer_edgedamage, autocvar_g_balance_minelayer_radius, world, autocvar_g_balance_minelayer_force, self.projectiledeathtype, other);
void W_Mine_DoRemoteExplode ()
{
- self.event_damage = SUB_Null;
+ self.event_damage = func_null;
self.takedamage = DAMAGE_NO;
if(self.movetype == MOVETYPE_NONE || self.movetype == MOVETYPE_FOLLOW)
float W_Mine_Count(entity e)
{
- float minecount;
+ float minecount = 0;
entity mine;
for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.realowner == e)
minecount += 1;
mine.nextthink = time;
mine.cnt = time + (autocvar_g_balance_minelayer_lifetime - autocvar_g_balance_minelayer_lifetime_countdown);
mine.flags = FL_PROJECTILE;
+ mine.missile_flags = MIF_SPLASH | MIF_ARC | MIF_PROXY;
CSQCProjectile(mine, TRUE, PROJECTILE_MINE, TRUE);
float W_PlacedMines(float detonate)
{
entity mine;
- float minfound;
+ float minfound = 0;
for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.realowner == self)
{
{
W_Reload(autocvar_g_balance_minelayer_ammo, autocvar_g_balance_minelayer_reload_ammo, autocvar_g_balance_minelayer_reload_time, "weapons/reload.wav");
}
+ else if (req == WR_SUICIDEMESSAGE)
+ {
+ return WEAPON_MINELAYER_SUICIDE;
+ }
+ else if (req == WR_KILLMESSAGE)
+ {
+ return WEAPON_MINELAYER_MURDER;
+ }
return TRUE;
}
#endif
{
precache_sound("weapons/mine_exp.wav");
}
- else if (req == WR_SUICIDEMESSAGE)
- if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
- w_deathtypestring = _("%s blew themself up with their minelayer");
- else
- w_deathtypestring = _("%s forgot about their mine");
- else if (req == WR_KILLMESSAGE)
- {
- if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
- w_deathtypestring = _("%s got too close to %s's mine");
- else if(w_deathtype & HITTYPE_SPLASH)
- w_deathtypestring = _("%s almost dodged %s's mine");
- else
- w_deathtypestring = _("%s stepped on %s's mine");
- }
return TRUE;
}
#endif