mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Allow timer pause pack on opening settings menu in battle
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#include "../../lib/battle/IBattleState.h"
|
#include "../../lib/battle/IBattleState.h"
|
||||||
#include "../../lib/mapObjects/CGObjectInstance.h"
|
#include "../../lib/mapObjects/CGObjectInstance.h"
|
||||||
#include "../../lib/networkPacks/PacksForServer.h"
|
#include "../../lib/networkPacks/PacksForServer.h"
|
||||||
|
#include "../../lib/serializer/Cast.h"
|
||||||
|
|
||||||
void CBattleQuery::notifyObjectAboutRemoval(const CObjectVisitQuery & objectVisit) const
|
void CBattleQuery::notifyObjectAboutRemoval(const CObjectVisitQuery & objectVisit) const
|
||||||
{
|
{
|
||||||
@@ -46,8 +47,13 @@ CBattleQuery::CBattleQuery(CGameHandler * owner):
|
|||||||
|
|
||||||
bool CBattleQuery::blocksPack(const CPack * pack) const
|
bool CBattleQuery::blocksPack(const CPack * pack) const
|
||||||
{
|
{
|
||||||
const char * name = typeid(*pack).name();
|
if(dynamic_ptr_cast<MakeAction>(pack) != nullptr)
|
||||||
return strcmp(name, typeid(MakeAction).name()) != 0;
|
return false;
|
||||||
|
|
||||||
|
if(dynamic_ptr_cast<GamePause>(pack) != nullptr)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBattleQuery::onRemoval(PlayerColor color)
|
void CBattleQuery::onRemoval(PlayerColor color)
|
||||||
|
Reference in New Issue
Block a user