mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-30 17:10:13 -05:00
Die Rise: solo lives fixes
This commit is contained in:
30
scripts/zm/replaced/_zm_chugabud.gsc
Normal file
30
scripts/zm/replaced/_zm_chugabud.gsc
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#include maps\mp\_utility;
|
||||||
|
#include common_scripts\utility;
|
||||||
|
#include maps\mp\zombies\_zm_utility;
|
||||||
|
#include maps/mp/zombies/_zm_chugabud;
|
||||||
|
|
||||||
|
chugabud_bleed_timeout( delay, corpse )
|
||||||
|
{
|
||||||
|
self endon( "player_suicide" );
|
||||||
|
self endon( "disconnect" );
|
||||||
|
corpse endon( "death" );
|
||||||
|
|
||||||
|
wait delay;
|
||||||
|
|
||||||
|
if ( isDefined( corpse.revivetrigger ) )
|
||||||
|
{
|
||||||
|
while ( corpse.revivetrigger.beingrevived )
|
||||||
|
{
|
||||||
|
wait 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( flag( "solo_game" ) && self.lives > 0 && isDefined( self.loadout.perks ) && self.loadout.perks.size > 0 )
|
||||||
|
{
|
||||||
|
self.lives--;
|
||||||
|
corpse notify( "player_revived" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self chugabud_corpse_cleanup( corpse, 0 );
|
||||||
|
}
|
101
scripts/zm/replaced/zm_highrise_classic.gsc
Normal file
101
scripts/zm/replaced/zm_highrise_classic.gsc
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
#include maps\mp\_utility;
|
||||||
|
#include common_scripts\utility;
|
||||||
|
#include maps\mp\zombies\_zm_utility;
|
||||||
|
#include maps/mp/zm_highrise_classic;
|
||||||
|
|
||||||
|
insta_kill_player( perks_can_respawn_player, kill_if_falling )
|
||||||
|
{
|
||||||
|
self endon( "disconnect" );
|
||||||
|
if ( isDefined( perks_can_respawn_player ) && perks_can_respawn_player == 0 )
|
||||||
|
{
|
||||||
|
if ( self hasperk( "specialty_quickrevive" ) )
|
||||||
|
{
|
||||||
|
self unsetperk( "specialty_quickrevive" );
|
||||||
|
}
|
||||||
|
if ( self hasperk( "specialty_finalstand" ) )
|
||||||
|
{
|
||||||
|
self unsetperk( "specialty_finalstand" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self maps/mp/zombies/_zm_buildables::player_return_piece_to_original_spawn();
|
||||||
|
if ( isDefined( self.insta_killed ) && self.insta_killed )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ( isDefined( self.ignore_insta_kill ) )
|
||||||
|
{
|
||||||
|
self.disable_chugabud_corpse = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ( self hasperk( "specialty_finalstand" ) )
|
||||||
|
{
|
||||||
|
self.ignore_insta_kill = 1;
|
||||||
|
self.disable_chugabud_corpse = 1;
|
||||||
|
self dodamage( self.health + 1000, ( 0, 0, 1 ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ( !isDefined( kill_if_falling ) || kill_if_falling == 0 )
|
||||||
|
{
|
||||||
|
if ( !self isonground() )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( is_player_killable( self ) )
|
||||||
|
{
|
||||||
|
self.insta_killed = 1;
|
||||||
|
in_last_stand = 0;
|
||||||
|
self notify( "chugabud_effects_cleanup" );
|
||||||
|
if ( self maps/mp/zombies/_zm_laststand::player_is_in_laststand() )
|
||||||
|
{
|
||||||
|
in_last_stand = 1;
|
||||||
|
}
|
||||||
|
self thread blood_splat();
|
||||||
|
if ( getnumconnectedplayers() == 1 )
|
||||||
|
{
|
||||||
|
if ( isDefined( self.lives ) && self.lives > 0 )
|
||||||
|
{
|
||||||
|
self.waiting_to_revive = 1;
|
||||||
|
points = getstruct( "zone_green_start", "script_noteworthy" );
|
||||||
|
spawn_points = getstructarray( points.target, "targetname" );
|
||||||
|
point = spawn_points[ 0 ];
|
||||||
|
if ( in_last_stand == 0 )
|
||||||
|
{
|
||||||
|
self dodamage( self.health + 1000, ( 0, 0, 1 ) );
|
||||||
|
}
|
||||||
|
wait 0.5;
|
||||||
|
self freezecontrols( 1 );
|
||||||
|
wait 0.25;
|
||||||
|
self setorigin( point.origin + vectorScale( ( 0, 0, 1 ), 20 ) );
|
||||||
|
self.angles = point.angles;
|
||||||
|
if ( in_last_stand )
|
||||||
|
{
|
||||||
|
flag_set( "instant_revive" );
|
||||||
|
self.stopflashingbadlytime = getTime() + 1000;
|
||||||
|
wait_network_frame();
|
||||||
|
flag_clear( "instant_revive" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self thread maps/mp/zombies/_zm_laststand::auto_revive( self );
|
||||||
|
self.waiting_to_revive = 0;
|
||||||
|
self.solo_respawn = 0;
|
||||||
|
self.lives--;
|
||||||
|
}
|
||||||
|
self freezecontrols( 0 );
|
||||||
|
self.insta_killed = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self dodamage( self.health + 1000, ( 0, 0, 1 ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self dodamage( self.health + 1000, ( 0, 0, 1 ) );
|
||||||
|
wait_network_frame();
|
||||||
|
self.bleedout_time = 0;
|
||||||
|
}
|
||||||
|
self.insta_killed = 0;
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,15 @@
|
|||||||
#include common_scripts\utility;
|
#include common_scripts\utility;
|
||||||
#include maps\mp\zombies\_zm_utility;
|
#include maps\mp\zombies\_zm_utility;
|
||||||
|
|
||||||
|
#include scripts/zm/replaced/zm_highrise_classic;
|
||||||
|
#include scripts/zm/replaced/_zm_chugabud;
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
replaceFunc(maps/mp/zm_highrise_classic::insta_kill_player, scripts/zm/replaced/zm_highrise_classic::insta_kill_player);
|
||||||
|
replaceFunc(maps/mp/zombies/_zm_chugabud::chugabud_bleed_timeout, scripts/zm/replaced/_zm_chugabud::chugabud_bleed_timeout);
|
||||||
|
}
|
||||||
|
|
||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
level thread elevator_solo_revive_fix();
|
level thread elevator_solo_revive_fix();
|
||||||
|
Reference in New Issue
Block a user