mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-12 08:08:00 -05:00
Grief: optimize round start wait
This commit is contained in:
@ -402,6 +402,11 @@ on_player_spawned()
|
|||||||
|
|
||||||
self thread grief_intro_text();
|
self thread grief_intro_text();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// round_start_wait resets these
|
||||||
|
self freezeControls(1);
|
||||||
|
self enableInvulnerability();
|
||||||
|
self disableWeapons();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -608,8 +613,7 @@ round_start_wait(time, initial)
|
|||||||
players = get_players();
|
players = get_players();
|
||||||
foreach(player in players)
|
foreach(player in players)
|
||||||
{
|
{
|
||||||
player.hostmigrationcontrolsfrozen = 1; // fixes players being able to move for a frame after initial_blackscreen_passed
|
player.hostmigrationcontrolsfrozen = 1; // fixes players being able to move after initial_blackscreen_passed
|
||||||
player disableWeapons();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
flag_wait("initial_blackscreen_passed");
|
flag_wait("initial_blackscreen_passed");
|
||||||
@ -617,21 +621,6 @@ round_start_wait(time, initial)
|
|||||||
|
|
||||||
level thread zombie_spawn_wait(time + 10);
|
level thread zombie_spawn_wait(time + 10);
|
||||||
|
|
||||||
players = get_players();
|
|
||||||
foreach(player in players)
|
|
||||||
{
|
|
||||||
// fixes players being frozen at wrong position and angle after respawn
|
|
||||||
if(!initial)
|
|
||||||
{
|
|
||||||
player setOrigin(player.spectator_respawn.origin);
|
|
||||||
player setPlayerAngles(player.spectator_respawn.angles);
|
|
||||||
}
|
|
||||||
|
|
||||||
player freezeControls(1);
|
|
||||||
player enableInvulnerability();
|
|
||||||
player disableWeapons();
|
|
||||||
}
|
|
||||||
|
|
||||||
round_start_countdown_hud = round_start_countdown_hud(time);
|
round_start_countdown_hud = round_start_countdown_hud(time);
|
||||||
|
|
||||||
wait time;
|
wait time;
|
||||||
@ -641,7 +630,11 @@ round_start_wait(time, initial)
|
|||||||
players = get_players();
|
players = get_players();
|
||||||
foreach(player in players)
|
foreach(player in players)
|
||||||
{
|
{
|
||||||
player.hostmigrationcontrolsfrozen = 0;
|
if(initial)
|
||||||
|
{
|
||||||
|
player.hostmigrationcontrolsfrozen = 0;
|
||||||
|
}
|
||||||
|
|
||||||
player freezeControls(0);
|
player freezeControls(0);
|
||||||
player disableInvulnerability();
|
player disableInvulnerability();
|
||||||
player enableWeapons();
|
player enableWeapons();
|
||||||
|
Reference in New Issue
Block a user