|
@@ -200,9 +200,16 @@ CreatureAnimation::CreatureAnimation(const AnimationPath & name_, TSpeedControll
|
|
|
speedController(controller),
|
|
|
once(false)
|
|
|
{
|
|
|
+
|
|
|
forward = GH.renderHandler().loadAnimation(name_, EImageBlitMode::WITH_SHADOW_AND_SELECTION);
|
|
|
reverse = GH.renderHandler().loadAnimation(name_, EImageBlitMode::WITH_SHADOW_AND_SELECTION);
|
|
|
|
|
|
+ if (forward->size(size_t(ECreatureAnimType::DEATH)) == 0)
|
|
|
+ throw std::runtime_error("Animation '" + name_.getOriginalName() + "' has empty death animation!");
|
|
|
+
|
|
|
+ if (forward->size(size_t(ECreatureAnimType::HOLDING)) == 0)
|
|
|
+ throw std::runtime_error("Animation '" + name_.getOriginalName() + "' has empty holding animation!");
|
|
|
+
|
|
|
// if necessary, add one frame into vcmi-only group DEAD
|
|
|
if(forward->size(size_t(ECreatureAnimType::DEAD)) == 0)
|
|
|
{
|