Do not cache hovered tile and always update state

This commit is contained in:
Ivan Savenko committed 2023-03-22 19:49:57 +02:00
1 parent fa9abf6adc
commit 8af76947cb
3 files changed
+11 -30

No files matched your search

+10 -9
View File
@@ -1511,6 +1511,7 @@ void CPlayerInterface::objectRemoved(const CGObjectInstance * obj)
const CGHeroInstance * h = static_cast<const CGHeroInstance *>(obj);
heroKilled(h);
}
GH.fakeMouseMove();
}
void CPlayerInterface::objectRemovedAfter()
@@ -2029,15 +2030,15 @@ bool CPlayerInterface::capturedAllEvents()
if (duringMovement)
{
//just inform that we are capturing events. they will be processed by heroMoved() in client thread.
return true;
}
bool needToLockAdventureMap = adventureInt->active && CGI->mh->hasOngoingAnimations();
if (ignoreEvents || needToLockAdventureMap)
{
boost::unique_lock<boost::mutex> un(eventsM);
while(!SDLEventsQueue.empty())
return true;
}
bool needToLockAdventureMap = adventureInt->active && CGI->mh->hasOngoingAnimations();
if (ignoreEvents || needToLockAdventureMap)
{
boost::unique_lock<boost::mutex> un(eventsM);
while(!SDLEventsQueue.empty())
{
SDLEventsQueue.pop();
}