Skip to content

Commit 5eebd3f

Browse files
DarkDefenderSupSuper
authored andcommitted
Fix arrow bobbing
1 parent 23e7aa6 commit 5eebd3f

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

‎src/Battlescape/Map.cpp‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ void Map::drawTerrain(Surface *surface)
226226
BattleUnit *unit = 0;
227227
bool invalid;
228228
int tileShade, wallShade, tileColor;
229-
static int flip = 1;
230-
int _animFrameNew;
231229

232230
NumberText *_numWaypid = 0;
233231

@@ -762,19 +760,9 @@ void Map::drawTerrain(Surface *surface)
762760
{
763761
offset.y += 4;
764762
}
765-
if (flip == 1)
766-
{
767-
_animFrameNew = _animFrame;
768-
}
769-
else
770-
{
771-
_animFrameNew = 7 - _animFrame;
772-
}
773-
if (_animFrameNew == 7) flip = -1;
774-
if (_animFrameNew == 0) flip = 1;
775763
if (this->getCursorType() != CT_NONE)
776764
{
777-
_arrow->blitNShade(surface, screenPosition.x + offset.x + (_spriteWidth / 2) - (_arrow->getWidth() / 2), screenPosition.y + offset.y - _arrow->getHeight() + _animFrameNew, 0);
765+
_arrow->blitNShade(surface, screenPosition.x + offset.x + (_spriteWidth / 2) - (_arrow->getWidth() / 2), screenPosition.y + offset.y - _arrow->getHeight() + 4*sin((_animFrame*6.28)/8), 0);
778766
}
779767
}
780768
delete _numWaypid;

0 commit comments

Comments
 (0)