mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Remove static variable
This commit is contained in:
@@ -363,8 +363,6 @@ std::optional<BattleAction> CClient::makeSurrenderRetreatDecision(PlayerColor pl
|
|||||||
|
|
||||||
int CClient::sendRequest(const CPackForServer & request, PlayerColor player, bool waitTillRealize)
|
int CClient::sendRequest(const CPackForServer & request, PlayerColor player, bool waitTillRealize)
|
||||||
{
|
{
|
||||||
static ui32 requestCounter = 1;
|
|
||||||
|
|
||||||
ui32 requestID = requestCounter++;
|
ui32 requestID = requestCounter++;
|
||||||
logNetwork->trace("Sending a request \"%s\". It'll have an ID=%d.", typeid(request).name(), requestID);
|
logNetwork->trace("Sending a request \"%s\". It'll have an ID=%d.", typeid(request).name(), requestID);
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ public:
|
|||||||
class CClient : public Environment, public IClient
|
class CClient : public Environment, public IClient
|
||||||
{
|
{
|
||||||
std::shared_ptr<CGameState> gamestate;
|
std::shared_ptr<CGameState> gamestate;
|
||||||
|
int requestCounter = 1;
|
||||||
public:
|
public:
|
||||||
std::map<PlayerColor, std::shared_ptr<CGameInterface>> playerint;
|
std::map<PlayerColor, std::shared_ptr<CGameInterface>> playerint;
|
||||||
std::map<PlayerColor, std::shared_ptr<CBattleGameInterface>> battleints;
|
std::map<PlayerColor, std::shared_ptr<CBattleGameInterface>> battleints;
|
||||||
|
|||||||
Reference in New Issue
Block a user