From be2e101c8c8839c31300a1de129f3d6d384a74cd Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 19 May 2023 13:22:18 +0300 Subject: [PATCH] Fix map freeze on enemy turn --- client/adventureMap/AdventureMapInterface.cpp | 4 ++++ client/mapView/MapView.cpp | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/adventureMap/AdventureMapInterface.cpp b/client/adventureMap/AdventureMapInterface.cpp index 7ba8c1fce..150aa73d2 100644 --- a/client/adventureMap/AdventureMapInterface.cpp +++ b/client/adventureMap/AdventureMapInterface.cpp @@ -147,6 +147,10 @@ void AdventureMapInterface::show(SDL_Surface * to) void AdventureMapInterface::tick(uint32_t 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) diff --git a/client/mapView/MapView.cpp b/client/mapView/MapView.cpp index c5e9dbccc..ec0b435a7 100644 --- a/client/mapView/MapView.cpp +++ b/client/mapView/MapView.cpp @@ -55,8 +55,6 @@ BasicMapView::BasicMapView(const Point & offset, const Point & dimensions) pos += offset; pos.w = dimensions.x; pos.h = dimensions.y; - - addUsedEvents(TIME); } void BasicMapView::render(Canvas & target, bool fullUpdate)