mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-01 00:45:26 +02:00
Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
This commit is contained in:
@ -355,9 +355,9 @@ bool MovementAnimation::init()
|
||||
myAnim->setType(ECreatureAnimType::MOVING);
|
||||
}
|
||||
|
||||
if (moveSoundHander == -1)
|
||||
if (moveSoundHandler == -1)
|
||||
{
|
||||
moveSoundHander = CCS->soundh->playSound(stack->unitType()->sounds.move, -1);
|
||||
moveSoundHandler = CCS->soundh->playSound(stack->unitType()->sounds.move, -1);
|
||||
}
|
||||
|
||||
Point begPosition = owner.stacksController->getStackPositionAtHex(prevHex, stack);
|
||||
@ -398,12 +398,12 @@ void MovementAnimation::tick(uint32_t msPassed)
|
||||
myAnim->pos.moveTo(coords);
|
||||
|
||||
// true if creature haven't reached the final destination hex
|
||||
if ((curentMoveIndex + 1) < destTiles.size())
|
||||
if ((currentMoveIndex + 1) < destTiles.size())
|
||||
{
|
||||
// update the next hex field which has to be reached by the stack
|
||||
curentMoveIndex++;
|
||||
currentMoveIndex++;
|
||||
prevHex = nextHex;
|
||||
nextHex = destTiles[curentMoveIndex];
|
||||
nextHex = destTiles[currentMoveIndex];
|
||||
|
||||
// request re-initialization
|
||||
initialized = false;
|
||||
@ -417,18 +417,18 @@ MovementAnimation::~MovementAnimation()
|
||||
{
|
||||
assert(stack);
|
||||
|
||||
if(moveSoundHander != -1)
|
||||
CCS->soundh->stopSound(moveSoundHander);
|
||||
if(moveSoundHandler != -1)
|
||||
CCS->soundh->stopSound(moveSoundHandler);
|
||||
}
|
||||
|
||||
MovementAnimation::MovementAnimation(BattleInterface & owner, const CStack *stack, std::vector<BattleHex> _destTiles, int _distance)
|
||||
: StackMoveAnimation(owner, stack, stack->getPosition(), _destTiles.front()),
|
||||
destTiles(_destTiles),
|
||||
curentMoveIndex(0),
|
||||
currentMoveIndex(0),
|
||||
begX(0), begY(0),
|
||||
distanceX(0), distanceY(0),
|
||||
progressPerSecond(0.0),
|
||||
moveSoundHander(-1),
|
||||
moveSoundHandler(-1),
|
||||
progress(0.0)
|
||||
{
|
||||
logAnim->debug("Created MovementAnimation for %s", stack->getName());
|
||||
@ -649,7 +649,7 @@ void RangedAttackAnimation::setAnimationGroup()
|
||||
Point shooterPos = stackAnimation(attackingStack)->pos.topLeft();
|
||||
Point shotTarget = owner.stacksController->getStackPositionAtHex(dest, defendingStack);
|
||||
|
||||
//maximal angle in radians between straight horizontal line and shooting line for which shot is considered to be straight (absoulte value)
|
||||
//maximal angle in radians between straight horizontal line and shooting line for which shot is considered to be straight (absolute value)
|
||||
static const double straightAngle = 0.2;
|
||||
|
||||
double projectileAngle = -atan2(shotTarget.y - shooterPos.y, std::abs(shotTarget.x - shooterPos.x));
|
||||
@ -672,18 +672,18 @@ void RangedAttackAnimation::initializeProjectile()
|
||||
|
||||
if (getGroup() == getUpwardsGroup())
|
||||
{
|
||||
shotOrigin.x += ( -25 + shooterInfo->animation.upperRightMissleOffsetX ) * multiplier;
|
||||
shotOrigin.y += shooterInfo->animation.upperRightMissleOffsetY;
|
||||
shotOrigin.x += ( -25 + shooterInfo->animation.upperRightMissileOffsetX ) * multiplier;
|
||||
shotOrigin.y += shooterInfo->animation.upperRightMissileOffsetY;
|
||||
}
|
||||
else if (getGroup() == getDownwardsGroup())
|
||||
{
|
||||
shotOrigin.x += ( -25 + shooterInfo->animation.lowerRightMissleOffsetX ) * multiplier;
|
||||
shotOrigin.y += shooterInfo->animation.lowerRightMissleOffsetY;
|
||||
shotOrigin.x += ( -25 + shooterInfo->animation.lowerRightMissileOffsetX ) * multiplier;
|
||||
shotOrigin.y += shooterInfo->animation.lowerRightMissileOffsetY;
|
||||
}
|
||||
else if (getGroup() == getForwardGroup())
|
||||
{
|
||||
shotOrigin.x += ( -25 + shooterInfo->animation.rightMissleOffsetX ) * multiplier;
|
||||
shotOrigin.y += shooterInfo->animation.rightMissleOffsetY;
|
||||
shotOrigin.x += ( -25 + shooterInfo->animation.rightMissileOffsetX ) * multiplier;
|
||||
shotOrigin.y += shooterInfo->animation.rightMissileOffsetY;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user