From 599a4cb23de34634479cb614cd1e6f4d22c3239d Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Thu, 13 Apr 2023 03:59:14 -0700 Subject: [PATCH] Add back solo_game flag change mid game --- scripts/zm/replaced/_zm.gsc | 16 +++++++++++++++- scripts/zm/replaced/_zm_ai_screecher.gsc | 4 ---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/zm/replaced/_zm.gsc b/scripts/zm/replaced/_zm.gsc index c219262a..f52e45a4 100644 --- a/scripts/zm/replaced/_zm.gsc +++ b/scripts/zm/replaced/_zm.gsc @@ -1853,5 +1853,19 @@ end_game() check_quickrevive_for_hotjoin(disconnecting_player) { - // always use coop quick revive + subtract_num = 0; + + if ( isdefined( disconnecting_player ) ) + subtract_num = 1; + + players = get_players(); + + if ( players.size - subtract_num == 1 ) + { + flag_set( "solo_game" ); + } + else + { + flag_clear( "solo_game" ); + } } \ No newline at end of file diff --git a/scripts/zm/replaced/_zm_ai_screecher.gsc b/scripts/zm/replaced/_zm_ai_screecher.gsc index 1efc8580..c0735f01 100644 --- a/scripts/zm/replaced/_zm_ai_screecher.gsc +++ b/scripts/zm/replaced/_zm_ai_screecher.gsc @@ -182,10 +182,6 @@ screecher_detach( player ) if ( isdefined( player.screecher_weapon ) && player.screecher_weapon != "none" && is_player_valid( player ) && !is_equipment_that_blocks_purchase( player.screecher_weapon ) ) player switchtoweapon( player.screecher_weapon ); - else if ( flag( "solo_game" ) && player hasperk( "specialty_quickrevive" ) ) - { - - } else if ( !player maps\mp\zombies\_zm_laststand::player_is_in_laststand() ) { primaryweapons = player getweaponslistprimaries();