diff --git a/client/battle/BattleStacksController.cpp b/client/battle/BattleStacksController.cpp index ce42482d8..7ad36f2ac 100644 --- a/client/battle/BattleStacksController.cpp +++ b/client/battle/BattleStacksController.cpp @@ -184,7 +184,6 @@ void BattleStacksController::stackReset(const CStack * stack) void BattleStacksController::stackAdded(const CStack * stack, bool instant) { // Tower shooters have only their upper half visible - // FIXME: causes issues in Dungeon - visible animation of Medusa tails (animation disabled in H3) static const int turretCreatureAnimationHeight = 232; stackFacingRight[stack->ID] = stack->side == BattleSide::ATTACKER; // must be set before getting stack position @@ -199,6 +198,11 @@ void BattleStacksController::stackAdded(const CStack * stack, bool instant) stackAnimation[stack->ID] = AnimationControls::getAnimation(turretCreature); stackAnimation[stack->ID]->pos.h = turretCreatureAnimationHeight; + stackAnimation[stack->ID]->pos.w = stackAnimation[stack->ID]->getWidth(); + + // FIXME: workaround for visible animation of Medusa tails (animation disabled in H3) + if (turretCreature->idNumber == CreatureID::MEDUSA ) + stackAnimation[stack->ID]->pos.w = 250; coords = owner.siegeController->getTurretCreaturePosition(stack->initialPosition); } @@ -207,10 +211,10 @@ void BattleStacksController::stackAdded(const CStack * stack, bool instant) stackAnimation[stack->ID] = AnimationControls::getAnimation(stack->getCreature()); stackAnimation[stack->ID]->onAnimationReset += std::bind(&onAnimationFinished, stack, stackAnimation[stack->ID]); stackAnimation[stack->ID]->pos.h = stackAnimation[stack->ID]->getHeight(); + stackAnimation[stack->ID]->pos.w = stackAnimation[stack->ID]->getWidth(); } stackAnimation[stack->ID]->pos.x = coords.x; stackAnimation[stack->ID]->pos.y = coords.y; - stackAnimation[stack->ID]->pos.w = stackAnimation[stack->ID]->getWidth(); stackAnimation[stack->ID]->setType(ECreatureAnimType::HOLDING); if (!instant) diff --git a/lib/GameConstants.h b/lib/GameConstants.h index d005af570..d7b2c9f69 100644 --- a/lib/GameConstants.h +++ b/lib/GameConstants.h @@ -1120,6 +1120,7 @@ public: LICHES = 64, BONE_DRAGON = 68, TROGLODYTES = 70, + MEDUSA = 76, HYDRA = 110, CHAOS_HYDRA = 111, AIR_ELEMENTAL = 112, @@ -1245,7 +1246,7 @@ class ObstacleInfo; class Obstacle : public BaseForID { INSTID_LIKE_CLASS_COMMON(Obstacle, si32) - + DLL_LINKAGE const ObstacleInfo * getInfo() const; DLL_LINKAGE operator std::string() const; DLL_LINKAGE static Obstacle fromString(const std::string & identifier);