mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Do not attempt to play animations when map is inactive
This commit is contained in:
parent
e3b1b0fbd6
commit
839172cd30
@ -18,6 +18,7 @@
|
||||
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../adventureMap/CAdvMapInt.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/CPathfinder.h"
|
||||
@ -206,6 +207,9 @@ bool MapViewController::isEventVisible(const CGObjectInstance * obj)
|
||||
if(!LOCPLINT->makingTurn && settings["adventure"]["enemyMoveTime"].Float() < 0)
|
||||
return false; // enemy move speed set to "hidden/none"
|
||||
|
||||
if(GH.topInt() != adventureInt)
|
||||
return false;
|
||||
|
||||
if(obj->isVisitable())
|
||||
return context->isVisible(obj->visitablePos());
|
||||
else
|
||||
@ -220,6 +224,9 @@ bool MapViewController::isEventVisible(const CGHeroInstance * obj, const int3 &
|
||||
if(!LOCPLINT->makingTurn && settings["adventure"]["enemyMoveTime"].Float() < 0)
|
||||
return false; // enemy move speed set to "hidden/none"
|
||||
|
||||
if(GH.topInt() != adventureInt)
|
||||
return false;
|
||||
|
||||
if(context->isVisible(obj->convertToVisitablePos(from)))
|
||||
return true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user