diff --git a/scripts/zm/_zm_reimagined.gsc b/scripts/zm/_zm_reimagined.gsc index c66beeb5..0161b5a9 100644 --- a/scripts/zm/_zm_reimagined.gsc +++ b/scripts/zm/_zm_reimagined.gsc @@ -1993,6 +1993,10 @@ ignoreme_after_revived() player_revive_protection() { self endon("disconnect"); + self endon("player_downed"); + self endon("meat_grabbed"); + + self thread player_revive_protection_timeout(); self.revive_protection = 1; @@ -2007,6 +2011,17 @@ player_revive_protection() self.ignoreme = 0; } + self.revive_protection = 0; + self notify("player_revive_protection_end"); +} + +player_revive_protection_timeout() +{ + self endon("disconnect"); + self endon("player_revive_protection_end"); + + self waittill_any("player_downed", "meat_grabbed"); + self.revive_protection = 0; } diff --git a/scripts/zm/replaced/_zm.gsc b/scripts/zm/replaced/_zm.gsc index 41583c31..4aeee11a 100644 --- a/scripts/zm/replaced/_zm.gsc +++ b/scripts/zm/replaced/_zm.gsc @@ -1069,7 +1069,11 @@ player_laststand( einflictor, attacker, idamage, smeansofdeath, sweapon, vdir, s player_spawn_protection() { - self endon( "disconnect" ); + self endon("disconnect"); + self endon("player_downed"); + self endon("meat_grabbed"); + + self thread player_spawn_protection_timeout(); self.spawn_protection = 1; @@ -1084,6 +1088,17 @@ player_spawn_protection() self.ignoreme = 0; } + self.spawn_protection = 0; + self notify("player_spawn_protection_end"); +} + +player_spawn_protection_timeout() +{ + self endon("disconnect"); + self endon("player_spawn_protection_end"); + + self waittill_any("player_downed", "meat_grabbed"); + self.spawn_protection = 0; } @@ -1328,6 +1343,7 @@ end_game() { players[ i ] cameraactivate( 0 ); } + exitlevel( 0 ); wait 666; } \ No newline at end of file