mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Add game pause
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
#include "processors/PlayerMessageProcessor.h"
|
||||
#include "processors/TurnOrderProcessor.h"
|
||||
#include "queries/QueriesProcessor.h"
|
||||
#include "queries/MapQueries.h"
|
||||
|
||||
#include "../lib/IGameCallback.h"
|
||||
#include "../lib/mapObjects/CGTownInstance.h"
|
||||
@ -35,6 +36,14 @@ void ApplyGhNetPackVisitor::visitSaveGame(SaveGame & pack)
|
||||
result = true;
|
||||
}
|
||||
|
||||
void ApplyGhNetPackVisitor::visitGamePause(GamePause & pack)
|
||||
{
|
||||
auto turnQuery = std::make_shared<TimerPauseQuery>(&gh, pack.player);
|
||||
turnQuery->queryID = QueryID::CLIENT;
|
||||
gh.queries->addQuery(turnQuery);
|
||||
result = true;
|
||||
}
|
||||
|
||||
void ApplyGhNetPackVisitor::visitEndTurn(EndTurn & pack)
|
||||
{
|
||||
gh.throwIfWrongPlayer(&pack);
|
||||
|
Reference in New Issue
Block a user