Skip to content

Commit

Permalink
Player muteChat state handling tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Nov 9, 2023
1 parent 150a57f commit 889e4a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/multiint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3240,6 +3240,7 @@ static SwapPlayerIndexesResult recvSwapPlayerIndexes(NETQUEUE queue, const std::
}
}
swapPlayerMultiStatsLocal(playerIndexA, playerIndexB);
std::swap(ingame.muteChat[playerIndexA], ingame.muteChat[playerIndexB]);
multiSyncPlayerSwap(playerIndexA, playerIndexB);

if (playerIndexA == selectedPlayer || playerIndexB == selectedPlayer)
Expand Down
2 changes: 2 additions & 0 deletions src/multijoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ bool MultiPlayerLeave(UDWORD playerIndex)
NETlogEntry("Player leaving game", SYNC_FLAG, playerIndex);
debug(LOG_NET, "** Player %u [%s], has left the game at game time %u.", playerIndex, getPlayerName(playerIndex), gameTime);

ingame.muteChat[playerIndex] = false;

if (wz_command_interface_enabled())
{
std::string playerPublicKeyB64 = base64Encode(getMultiStats(playerIndex).identity.toBytes(EcKey::Public));
Expand Down

0 comments on commit 889e4a8

Please sign in to comment.