From 215551d9f4ecd2dfff4ad0818b2ebdf36309aff4 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Wed, 5 Jan 2022 02:52:59 -0800 Subject: [PATCH] Tombstone: powerup gets destroyed by EMP Grenades Fix powerup being hidden while being revived --- README.md | 8 ++++---- scripts/zm/_zm_reimagined.gsc | 33 +++++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4b78909b..70726945 100644 --- a/README.md +++ b/README.md @@ -149,9 +149,10 @@ ### Tombstone Soda * Added in solo -* Tombstone powerup no longer removed when revived -* Unlimited time to pick up Tombstone powerup -* Changed Tombstone powerup fx color to blue +* Powerup no longer removed when revived +* Unlimited time to pick up powerup +* Changed powerup fx color to blue +* Powerup gets destroyed by EMP Grenades * Disabled suicide option when player is down * Flipped perk icon @@ -288,7 +289,6 @@ * Der Wunderfizz: increased cost from 1500 to 2500 * Der Wunderfizz: all perks have an equal chance of being obtained * Rituals of the Ancients: spend points challenge reward changed from Double Tap perk to a random perk that the player does not have (perk does not change if reward is reopened) -* Rituals of the Ancients: spend points challenge reward gives a permament perk slot * Soul boxes: decreased kill requirement from 30 to 20 * Perk bottle dig spots: give random perk * Perk bottle dig spots: visible and diggable without Zombie Blood diff --git a/scripts/zm/_zm_reimagined.gsc b/scripts/zm/_zm_reimagined.gsc index 3f93952b..4ed23c92 100644 --- a/scripts/zm/_zm_reimagined.gsc +++ b/scripts/zm/_zm_reimagined.gsc @@ -4115,7 +4115,7 @@ tombstone_spawn() { if(isDefined(self.tombstone_powerup)) { - self.tombstone_powerup tombstone_remove(); + self.tombstone_powerup tombstone_delete(); } dc = spawn( "script_model", self.origin + vectorScale( ( 0, 0, 1 ), 40 ) ); @@ -4132,13 +4132,13 @@ tombstone_spawn() self thread maps/mp/zombies/_zm_tombstone::tombstone_clear(); dc thread tombstone_wobble(); - dc thread maps/mp/zombies/_zm_tombstone::tombstone_revived( self ); + dc thread tombstone_emp(); result = self waittill_any_return( "player_revived", "spawned_player", "disconnect" ); if (result == "disconnect") { - dc tombstone_remove(); + dc tombstone_delete(); return; } else if(result == "player_revived") @@ -4146,7 +4146,7 @@ tombstone_spawn() tombstone = level.tombstones[self.tombstone_index]; if(tombstone.perk.size == 1) { - dc tombstone_remove(); + dc tombstone_delete(); return; } @@ -4176,6 +4176,27 @@ tombstone_wobble() } } +tombstone_emp() +{ + self endon( "tombstone_timedout" ); + self endon( "tombstone_grabbed" ); + + if ( !should_watch_for_emp() ) + { + return; + } + + while ( 1 ) + { + level waittill( "emp_detonate", origin, radius ); + if ( distancesquared( origin, self.origin ) < ( radius * radius ) ) + { + playfx( level._effect[ "powerup_off" ], self.origin ); + self thread tombstone_delete(); + } + } +} + tombstone_timeout() { self endon( "tombstone_grabbed" ); @@ -4184,7 +4205,7 @@ tombstone_timeout() self waittill("bled_out"); - self tombstone_remove(); + self tombstone_delete(); } tombstone_grab() @@ -4240,7 +4261,7 @@ tombstone_perks_only() self.zombie_cymbal_monkey_count = undefined; } -tombstone_remove() +tombstone_delete() { self notify( "tombstone_timedout" ); self.icon unlink();