1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Reduced usage of topWindow() method

This commit is contained in:
Ivan Savenko
2023-05-16 18:34:23 +03:00
parent e2ef136003
commit ad3e54e6c0
30 changed files with 171 additions and 115 deletions

View File

@ -209,7 +209,7 @@ 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.windows().topWindow() != adventureInt)
if(!GH.windows().isTopWindow(adventureInt))
return false;
if(obj->isVisitable())
@ -226,7 +226,7 @@ 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.windows().topWindow() != adventureInt)
if(!GH.windows().isTopWindow(adventureInt))
return false;
if(context->isVisible(obj->convertToVisitablePos(from)))