fixed cmdDeckSelect (2)

This commit is contained in:
Max-Wilhelm Bruker 2013-01-12 16:33:29 +01:00
parent 1d151d2d12
commit 2789116d03
7 changed files with 20 additions and 17 deletions

View file

@ -84,7 +84,7 @@
#include <QDebug>
Server_Player::Server_Player(Server_Game *_game, int _playerId, const ServerInfo_User &_userInfo, bool _spectator, Server_AbstractUserInterface *_userInterface)
: game(_game), userInterface(_userInterface), userInfo(new ServerInfo_User(_userInfo)), deck(0), pingTime(0), playerId(_playerId), spectator(_spectator), nextCardId(0), readyStart(false), conceded(false), sideboardLocked(true)
: ServerInfo_User_Container(_userInfo), game(_game), userInterface(_userInterface), deck(0), pingTime(0), playerId(_playerId), spectator(_spectator), nextCardId(0), readyStart(false), conceded(false), sideboardLocked(true)
{
}
@ -101,9 +101,6 @@ void Server_Player::prepareDestroy()
userInterface->playerRemovedFromGame(game);
playerMutex.unlock();
delete userInfo;
userInfo = 0;
clearZones();
deleteLater();
@ -244,7 +241,7 @@ void Server_Player::getProperties(ServerInfo_PlayerProperties &result, bool with
{
result.set_player_id(playerId);
if (withUserInfo)
result.mutable_user_info()->CopyFrom(*userInfo);
copyUserInfo(*(result.mutable_user_info()), true);
result.set_spectator(spectator);
if (!spectator) {
result.set_conceded(conceded);