1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fix boat extra animations

This commit is contained in:
nordsoft
2023-04-17 23:39:34 +04:00
parent e3ed728193
commit 2babb5add5

View File

@@ -477,7 +477,7 @@ std::shared_ptr<CAnimation> MapRendererObjects::getOverlayAnimation(const CGObje
}; };
const auto * boat = dynamic_cast<const CGBoat *>(obj); const auto * boat = dynamic_cast<const CGBoat *>(obj);
if (boat->hero) if(boat->hero && obj->subID < boatAnimations.size())
return getAnimation(boatAnimations[obj->subID], true); return getAnimation(boatAnimations[obj->subID], true);
} }
return nullptr; return nullptr;