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:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user