mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-11 15:48:05 -05:00
Grief: fix player position and angle on round start freeze
Optimize round start freeze code
This commit is contained in:
@ -237,6 +237,8 @@ zombie_goto_round(target_round)
|
|||||||
|
|
||||||
maps/mp/zombies/_zm_game_module::respawn_players();
|
maps/mp/zombies/_zm_game_module::respawn_players();
|
||||||
|
|
||||||
|
wait 0.05; // let all players fully respawn
|
||||||
|
|
||||||
level thread player_respawn_award();
|
level thread player_respawn_award();
|
||||||
|
|
||||||
level thread scripts/zm/zgrief/zgrief_reimagined::round_start_wait(5);
|
level thread scripts/zm/zgrief/zgrief_reimagined::round_start_wait(5);
|
||||||
@ -244,8 +246,6 @@ zombie_goto_round(target_round)
|
|||||||
|
|
||||||
player_respawn_award()
|
player_respawn_award()
|
||||||
{
|
{
|
||||||
wait 0.05; // let all players fully respawn
|
|
||||||
|
|
||||||
maps/mp/zombies/_zm::award_grenades_for_survivors();
|
maps/mp/zombies/_zm::award_grenades_for_survivors();
|
||||||
players = get_players();
|
players = get_players();
|
||||||
foreach(player in players)
|
foreach(player in players)
|
||||||
|
@ -617,7 +617,14 @@ round_start_wait(time, initial)
|
|||||||
players = get_players();
|
players = get_players();
|
||||||
foreach(player in players)
|
foreach(player in players)
|
||||||
{
|
{
|
||||||
player thread wait_and_freeze_controls(1); // need a wait or players can move
|
// 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 enableInvulnerability();
|
||||||
player disableWeapons();
|
player disableWeapons();
|
||||||
}
|
}
|
||||||
@ -640,15 +647,6 @@ round_start_wait(time, initial)
|
|||||||
level notify("restart_round_start");
|
level notify("restart_round_start");
|
||||||
}
|
}
|
||||||
|
|
||||||
wait_and_freeze_controls(bool)
|
|
||||||
{
|
|
||||||
self endon("disconnect");
|
|
||||||
|
|
||||||
wait_network_frame();
|
|
||||||
|
|
||||||
self freezeControls(bool);
|
|
||||||
}
|
|
||||||
|
|
||||||
round_start_countdown_hud(time)
|
round_start_countdown_hud(time)
|
||||||
{
|
{
|
||||||
countdown = createServerFontString( "objective", 2.2 );
|
countdown = createServerFontString( "objective", 2.2 );
|
||||||
|
Reference in New Issue
Block a user