mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
server-side replay support
This commit is contained in:
parent
7cec442694
commit
d50d179b2f
13 changed files with 177 additions and 89 deletions
|
|
@ -191,13 +191,14 @@ void Server_Player::clearZones()
|
|||
lastDrawList.clear();
|
||||
}
|
||||
|
||||
ServerInfo_PlayerProperties Server_Player::getProperties()
|
||||
ServerInfo_PlayerProperties Server_Player::getProperties(bool withUserInfo)
|
||||
{
|
||||
QMutexLocker locker(&game->gameMutex);
|
||||
|
||||
ServerInfo_PlayerProperties result;
|
||||
result.set_player_id(playerId);
|
||||
result.mutable_user_info()->CopyFrom(*userInfo);
|
||||
if (withUserInfo)
|
||||
result.mutable_user_info()->CopyFrom(*userInfo);
|
||||
result.set_spectator(spectator);
|
||||
result.set_conceded(conceded);
|
||||
result.set_ready_start(readyStart);
|
||||
|
|
@ -581,12 +582,12 @@ Response::ResponseCode Server_Player::setCardAttrHelper(GameEventStorage &ges, c
|
|||
return Response::RespOk;
|
||||
}
|
||||
|
||||
void Server_Player::sendGameEvent(GameEventContainer *cont)
|
||||
void Server_Player::sendGameEvent(const GameEventContainer &cont)
|
||||
{
|
||||
QMutexLocker locker(&playerMutex);
|
||||
|
||||
if (handler)
|
||||
handler->sendProtocolItem(*cont);
|
||||
handler->sendProtocolItem(cont);
|
||||
}
|
||||
|
||||
void Server_Player::setProtocolHandler(Server_ProtocolHandler *_handler)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue