diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp index 3147292b..72af6b14 100644 --- a/src/net/common/clientstate.cpp +++ b/src/net/common/clientstate.cpp @@ -674,6 +674,10 @@ AbstractClientStateReceiving::HandlePacket(boost::shared_ptr clien // A player left the game. GamePlayerLeft_t *netLeft = &netGamePlayer->gamePlayerNotification.choice.gamePlayerLeft; + boost::shared_ptr tmpPlayer = client->GetGame()->getPlayerByUniqueId(netLeft->playerId); + if (tmpPlayer) { + tmpPlayer->setIsKicked(netLeft->gamePlayerLeftReason == gamePlayerLeftReason_leftKicked); + } // Signal to GUI and remove from data list. client->RemovePlayerData(netLeft->playerId, netLeft->gamePlayerLeftReason); } else if (netGamePlayer->gamePlayerNotification.present == gamePlayerNotification_PR_gameAdminChanged) { diff --git a/src/net/common/clientthread.cpp b/src/net/common/clientthread.cpp index 983bea8e..c00e2259 100644 --- a/src/net/common/clientthread.cpp +++ b/src/net/common/clientthread.cpp @@ -1167,7 +1167,9 @@ ClientThread::RemoveDisconnectedPlayers() if (tmpPlayer->getMyActiveStatus()) { // If a player is not in the player data list, it was disconnected. if (!GetPlayerDataByUniqueId(tmpPlayer->getMyUniqueID()).get()) { - //tmpPlayer->setMyCash(0); + if (tmpPlayer->isKicked()) { + tmpPlayer->setMyCash(0); + } tmpPlayer->setMyActiveStatus(false); } }