1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-11 23:57:59 -05:00

Solo lives uses separate variable instead of .lives

Makes solo lives work on MOTD
This commit is contained in:
Jbleezy
2022-01-11 14:51:53 -08:00
parent 8fe8586c52
commit 472e2741db
4 changed files with 9 additions and 20 deletions

View File

@ -98,13 +98,12 @@ onplayerspawned()
{ {
self.initial_spawn = false; self.initial_spawn = false;
self.solo_lives_given = 0;
self.screecher_seen_hint = 1; self.screecher_seen_hint = 1;
self bank_clear_account_value(); self bank_clear_account_value();
self weapon_locker_clear_stored_weapondata(); self weapon_locker_clear_stored_weapondata();
self thread give_solo_lives();
self thread health_bar_hud(); self thread health_bar_hud();
self thread bleedout_bar_hud(); self thread bleedout_bar_hud();
self thread zone_hud(); self thread zone_hud();
@ -139,7 +138,7 @@ onplayerspawned()
//self thread test(); //self thread test();
//self.score = 1000000; self.score = 1000000;
//maps/mp/zombies/_zm_perks::give_perk( "specialty_armorvest", 0 ); //maps/mp/zombies/_zm_perks::give_perk( "specialty_armorvest", 0 );
//self GiveWeapon("dsr50_zm"); //self GiveWeapon("dsr50_zm");
//self GiveMaxAmmo("dsr50_zm"); //self GiveMaxAmmo("dsr50_zm");
@ -261,16 +260,6 @@ set_perks()
self setperk( "specialty_fastmantle" ); self setperk( "specialty_fastmantle" );
} }
give_solo_lives()
{
flag_wait( "initial_players_connected" );
if(flag("solo_game"))
{
self.lives = 3;
}
}
health_bar_hud() health_bar_hud()
{ {
self endon("disconnect"); self endon("disconnect");

View File

@ -610,7 +610,7 @@ player_damage_override( einflictor, eattacker, idamage, idflags, smeansofdeath,
} }
if ( count < players.size || isDefined( level._game_module_game_end_check ) && ![[ level._game_module_game_end_check ]]() ) if ( count < players.size || isDefined( level._game_module_game_end_check ) && ![[ level._game_module_game_end_check ]]() )
{ {
if ( isDefined( self.lives ) && self.lives > 0 && is_true( level.force_solo_quick_revive ) && self hasperk( "specialty_quickrevive" ) ) if ( isDefined( self.solo_lives_given ) && self.solo_lives_given < 3 && is_true( level.force_solo_quick_revive ) && self hasperk( "specialty_quickrevive" ) )
{ {
self thread maps/mp/zombies/_zm::wait_and_revive(); self thread maps/mp/zombies/_zm::wait_and_revive();
} }
@ -679,7 +679,7 @@ is_solo_death( self, players )
{ {
if ( players.size == 1 && flag( "solo_game" ) ) if ( players.size == 1 && flag( "solo_game" ) )
{ {
if(self.lives == 0) if(self.solo_lives_given >= 3)
{ {
return 1; return 1;
} }
@ -737,7 +737,7 @@ player_laststand( einflictor, attacker, idamage, smeansofdeath, sweapon, vdir, s
players = get_players(); players = get_players();
if ( players.size == 1 && flag( "solo_game" ) ) if ( players.size == 1 && flag( "solo_game" ) )
{ {
if ( self.lives > 0 ) if ( self.solo_lives_given < 3 )
{ {
active_perks = 0; active_perks = 0;
if(isDefined(self.perks_active)) if(isDefined(self.perks_active))
@ -862,7 +862,7 @@ wait_and_revive()
} }
flag_clear( "wait_and_revive" ); flag_clear( "wait_and_revive" );
self maps/mp/zombies/_zm_laststand::auto_revive( self ); self maps/mp/zombies/_zm_laststand::auto_revive( self );
self.lives--; self.solo_lives_given++;
self.waiting_to_revive = 0; self.waiting_to_revive = 0;
if ( is_true( self.pers_upgrades_awarded[ "perk_lose" ] ) ) if ( is_true( self.pers_upgrades_awarded[ "perk_lose" ] ) )

View File

@ -19,9 +19,9 @@ chugabud_bleed_timeout( delay, corpse )
} }
} }
if ( flag( "solo_game" ) && self.lives > 0 && isDefined( self.loadout.perks ) && self.loadout.perks.size > 0 ) if ( flag( "solo_game" ) && self.solo_lives_given < 3 )
{ {
self.lives--; self.solo_lives_given++;
corpse notify( "player_revived" ); corpse notify( "player_revived" );
return; return;
} }

View File

@ -53,7 +53,7 @@ insta_kill_player( perks_can_respawn_player, kill_if_falling )
self thread blood_splat(); self thread blood_splat();
if ( getnumconnectedplayers() == 1 ) if ( getnumconnectedplayers() == 1 )
{ {
if ( isDefined( self.lives ) && self.lives > 0 ) if ( isDefined( self.solo_lives_given ) && self.solo_lives_given < 3 )
{ {
self.waiting_to_revive = 1; self.waiting_to_revive = 1;
points = getstruct( "zone_green_start", "script_noteworthy" ); points = getstruct( "zone_green_start", "script_noteworthy" );