mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-10 23:27:57 -05:00
Update player needs to be revived text instantly
This commit is contained in:
@ -23,6 +23,7 @@ main()
|
||||
replaceFunc(maps/mp/zombies/_zm_utility::track_players_intersection_tracker, scripts/zm/replaced/_zm_utility::track_players_intersection_tracker);
|
||||
replaceFunc(maps/mp/zombies/_zm_utility::is_headshot, scripts/zm/replaced/_zm_utility::is_headshot);
|
||||
replaceFunc(maps/mp/zombies/_zm_laststand::revive_do_revive, scripts/zm/replaced/_zm_laststand::revive_do_revive);
|
||||
replaceFunc(maps/mp/zombies/_zm_laststand::revive_hud_think, scripts/zm/replaced/_zm_laststand::revive_hud_think);
|
||||
replaceFunc(maps/mp/zombies/_zm_weapons::get_upgraded_ammo_cost, scripts/zm/replaced/_zm_weapons::get_upgraded_ammo_cost);
|
||||
replaceFunc(maps/mp/zombies/_zm_weapons::makegrenadedudanddestroy, scripts/zm/replaced/_zm_weapons::makegrenadedudanddestroy);
|
||||
replaceFunc(maps/mp/zombies/_zm_magicbox::treasure_chest_move, scripts/zm/replaced/_zm_magicbox::treasure_chest_move);
|
||||
|
@ -147,4 +147,70 @@ laststand_clean_up_on_disconnect( playerbeingrevived, revivergun )
|
||||
self.revivetexthud destroy();
|
||||
}
|
||||
self maps/mp/zombies/_zm_laststand::revive_give_back_weapons( revivergun );
|
||||
}
|
||||
|
||||
revive_hud_think()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
wait 0.1;
|
||||
if ( !maps/mp/zombies/_zm_laststand::player_any_player_in_laststand() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
players = get_players();
|
||||
playertorevive = undefined;
|
||||
i = 0;
|
||||
while ( i < players.size )
|
||||
{
|
||||
if ( !isDefined( players[ i ].revivetrigger ) || !isDefined( players[ i ].revivetrigger.createtime ) )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( !isDefined( playertorevive ) || playertorevive.revivetrigger.createtime > players[ i ].revivetrigger.createtime )
|
||||
{
|
||||
playertorevive = players[ i ];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if ( isDefined( playertorevive ) )
|
||||
{
|
||||
i = 0;
|
||||
while ( i < players.size )
|
||||
{
|
||||
if ( players[ i ] maps/mp/zombies/_zm_laststand::player_is_in_laststand() )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( getDvar( "g_gametype" ) == "vs" )
|
||||
{
|
||||
if ( players[ i ].team != playertorevive.team )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ( is_encounter() )
|
||||
{
|
||||
if ( players[ i ].sessionteam != playertorevive.sessionteam )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( is_true( level.hide_revive_message ) )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
players[ i ] thread maps/mp/zombies/_zm_laststand::faderevivemessageover( playertorevive, 3 );
|
||||
i++;
|
||||
}
|
||||
playertorevive.revivetrigger.createtime = undefined;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user