mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Fix casting of massive spells by creatures
This commit is contained in:
parent
21196e822f
commit
6b2490903d
@ -810,14 +810,19 @@ void CatapultAnimation::createProjectile(const Point & from, const Point & dest)
|
||||
owner.projectilesController->createCatapultProjectile(attackingStack, from, dest);
|
||||
}
|
||||
|
||||
CastAnimation::CastAnimation(BattleInterface & owner_, const CStack * attacker, BattleHex dest_, const CStack * defender, const CSpell * spell)
|
||||
: RangedAttackAnimation(owner_, attacker, dest_, defender),
|
||||
CastAnimation::CastAnimation(BattleInterface & owner_, const CStack * attacker, BattleHex dest, const CStack * defender, const CSpell * spell)
|
||||
: RangedAttackAnimation(owner_, attacker, dest, defender),
|
||||
spell(spell)
|
||||
{
|
||||
assert(dest.isValid());// FIXME: when?
|
||||
if(!dest.isValid())
|
||||
{
|
||||
assert(spell->animationInfo.projectile.empty());
|
||||
|
||||
if(!dest_.isValid() && defender)
|
||||
dest = defender->getPosition();
|
||||
if (defender)
|
||||
dest = defender->getPosition();
|
||||
else
|
||||
dest = attacker->getPosition();
|
||||
}
|
||||
}
|
||||
|
||||
ECreatureAnimType CastAnimation::getUpwardsGroup() const
|
||||
|
@ -572,11 +572,6 @@ CSpell::TargetInfo::TargetInfo(const CSpell * spell, const int level, spells::Mo
|
||||
massive = levelInfo.range == "X";
|
||||
clearAffected = levelInfo.clearAffected;
|
||||
clearTarget = levelInfo.clearTarget;
|
||||
|
||||
if(mode == spells::Mode::CREATURE_ACTIVE)
|
||||
{
|
||||
massive = false;//FIXME: find better solution for Commander spells
|
||||
}
|
||||
}
|
||||
|
||||
bool DLL_LINKAGE isInScreenRange(const int3 & center, const int3 & pos)
|
||||
|
Loading…
Reference in New Issue
Block a user