mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Fix map freeze on enemy turn
This commit is contained in:
@ -147,6 +147,10 @@ void AdventureMapInterface::show(SDL_Surface * to)
|
|||||||
void AdventureMapInterface::tick(uint32_t msPassed)
|
void AdventureMapInterface::tick(uint32_t msPassed)
|
||||||
{
|
{
|
||||||
handleMapScrollingUpdate(msPassed);
|
handleMapScrollingUpdate(msPassed);
|
||||||
|
|
||||||
|
// we want animations to be active during enemy turn but map itself to be non-interactive
|
||||||
|
// so call timer update directly on inactive element
|
||||||
|
widget->getMapView()->tick(msPassed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdventureMapInterface::handleMapScrollingUpdate(uint32_t timePassed)
|
void AdventureMapInterface::handleMapScrollingUpdate(uint32_t timePassed)
|
||||||
|
@ -55,8 +55,6 @@ BasicMapView::BasicMapView(const Point & offset, const Point & dimensions)
|
|||||||
pos += offset;
|
pos += offset;
|
||||||
pos.w = dimensions.x;
|
pos.w = dimensions.x;
|
||||||
pos.h = dimensions.y;
|
pos.h = dimensions.y;
|
||||||
|
|
||||||
addUsedEvents(TIME);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BasicMapView::render(Canvas & target, bool fullUpdate)
|
void BasicMapView::render(Canvas & target, bool fullUpdate)
|
||||||
|
Reference in New Issue
Block a user