Skip to content

Commit

Permalink
Show "[PlayerName] has left the game." to all players again.
Browse files Browse the repository at this point in the history
Fixes ticket:3461.
  • Loading branch information
Cyp committed May 21, 2012
1 parent 22799c2 commit 00b1968
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/multijoin.cpp
Expand Up @@ -250,6 +250,9 @@ void recvPlayerLeft(NETQUEUE queue)
turnOffMultiMsg(false);
NetPlay.players[playerIndex].allocated = false;

char buf[256];
ssprintf(buf, _("%s has Left the Game"), getPlayerName(playerIndex));
addConsoleMessage(buf, DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
NETsetPlayerConnectionStatus(CONNECTIONSTATUS_PLAYER_DROPPED, playerIndex);

debug(LOG_INFO, "** player %u has dropped, in-game!", playerIndex);
Expand All @@ -259,8 +262,6 @@ void recvPlayerLeft(NETQUEUE queue)
// A remote player has left the game
bool MultiPlayerLeave(UDWORD playerIndex)
{
char buf[255];

if (playerIndex >= MAX_PLAYERS)
{
ASSERT(false, "Bad player number");
Expand All @@ -270,8 +271,6 @@ 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);

ssprintf(buf, _("%s has Left the Game"), getPlayerName(playerIndex));

if (ingame.localJoiningInProgress)
{
clearPlayer(playerIndex, false);
Expand All @@ -282,8 +281,6 @@ bool MultiPlayerLeave(UDWORD playerIndex)
}
game.skDiff[playerIndex] = 0;

addConsoleMessage(buf, DEFAULT_JUSTIFY, SYSTEM_MESSAGE);

if (NetPlay.players[playerIndex].wzFile.isSending)
{
char buf[256];
Expand Down

0 comments on commit 00b1968

Please sign in to comment.