// our lifetime has expired, it's time to die - mine_time just allows us to play a sound for this
// TODO: replace this mine_trigger.wav sound with a real countdown
- if((time > self.cnt) && (!self.mine_time))
+ if((time > self.cnt) && (!self.mine_time) && (self.cnt > 0))
{
if(WEP_CVAR(minelayer, lifetime_countdown) > 0)
spamsound(self, CH_SHOTS, "weapons/mine_trigger.wav", VOL_BASE, ATTN_NORM);
mine.touch = W_MineLayer_Touch;
mine.think = W_MineLayer_Think;
mine.nextthink = time;
- mine.cnt = time + (WEP_CVAR(minelayer, lifetime) - WEP_CVAR(minelayer, lifetime_countdown));
+ mine.cnt = (WEP_CVAR(minelayer, lifetime) - WEP_CVAR(minelayer, lifetime_countdown));
mine.flags = FL_PROJECTILE;
mine.missile_flags = MIF_SPLASH | MIF_ARC | MIF_PROXY;
+ if(mine.cnt > 0) { mine.cnt += time; }
+
CSQCProjectile(mine, TRUE, PROJECTILE_MINE, TRUE);
// muzzle flash for 1st person view