1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Add network thread termination logic for adventure map animations

This commit is contained in:
Ivan Savenko
2024-05-18 12:15:48 +00:00
parent 9bfe000724
commit d502850054
10 changed files with 36 additions and 8 deletions

View File

@@ -10,6 +10,7 @@
#pragma once
#include "IMapRendererObserver.h"
#include "../ConditionalWait.h"
#include "../../lib/Point.h"
VCMI_LIB_NAMESPACE_BEGIN
@@ -34,6 +35,8 @@ class MapRendererPuzzleMapContext;
/// such as its position and any animations
class MapViewController : public IMapObjectObserver
{
ConditionalWait animationWait;
std::shared_ptr<IMapRendererContext> context;
std::shared_ptr<MapRendererContextState> state;
std::shared_ptr<MapViewModel> model;
@@ -68,6 +71,9 @@ private:
// IMapObjectObserver impl
bool hasOngoingAnimations() override;
void waitForOngoingAnimations() override;
void endNetwork() override;
void onObjectFadeIn(const CGObjectInstance * obj, const PlayerColor & initiator) override;
void onObjectFadeOut(const CGObjectInstance * obj, const PlayerColor & initiator) override;
void onObjectInstantAdd(const CGObjectInstance * obj, const PlayerColor & initiator) override;