Navigation Menu

Skip to content

Commit

Permalink
Fix player ships not moving in the POSTGAME phase.
Browse files Browse the repository at this point in the history
I introduced this bug when I tried to prevent the "ghost collision sounds"
which resulted from the lag compensation extrapolating the ship positions
into infinity after the gameplay ended. However, the ships should be
allowed to move in the POSTGAME phase, too, not only in PLAYING state.
  • Loading branch information
derhass committed Aug 8, 2021
1 parent e0f2a42 commit 4a8f7cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GameMod/MPClientExtrapolation.cs
Expand Up @@ -630,7 +630,7 @@ public static void updatePlayerPositions()
class MPClientExtrapolation_ClientUpdate{
static bool Prefix(){
// This function is called once per frame from Client.Update()
if (Overload.NetworkManager.IsServer() || NetworkMatch.m_match_state != MatchState.PLAYING) {
if (Overload.NetworkManager.IsServer() || (NetworkMatch.m_match_state != MatchState.PLAYING && NetworkMatch.m_match_state != MatchState.POSTGAME)) {
// no need to move ships around
return false;
}
Expand Down

0 comments on commit 4a8f7cf

Please sign in to comment.