set g_balance_minelayer_limit 4 // 0 disables the limit
set g_balance_minelayer_damageforcescale 0
set g_balance_minelayer_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
+set g_balance_minelayer_time 1
set g_balance_minelayer_remote_damage 45
set g_balance_minelayer_remote_edgedamage 40
set g_balance_minelayer_remote_radius 200
#else
#ifdef SVQC
.float minelayer_detonate;
-.float mine_number;
+.float mine_number, mine_time;
void spawnfunc_weapon_minelayer (void)
{
if(head.classname == "player" && head.deadflag == DEAD_NO)
if(head != self.owner)
if(IsDifferentTeam(head, self.owner)) // don't detonate for team mates
- W_Mine_Explode();
+ {
+ self.mine_time = time + cvar("g_balance_minelayer_time");
+ }
head = head.chain;
}
+ // explode if it's time
+ if(time >= self.mine_time)
+ W_Mine_Explode();
+
// remote detonation
if (self.owner.weapon == WEP_MINE_LAYER)
if (self.owner.deadflag == DEAD_NO)