Commit 318801ba authored by alistert's avatar alistert

Overflow fix.

parent 5eb0197a
...@@ -671,8 +671,8 @@ void Player::bonusStep (unsigned int ticks, int msps, Bonus* bonus) { ...@@ -671,8 +671,8 @@ void Player::bonusStep (unsigned int ticks, int msps, Bonus* bonus) {
// Apply trajectory // Apply trajectory
cdx = (fSin(direction) * dx * msps) >> 20; cdx = (MUL(fSin(direction), dx) * msps) >> 10;
cdy = (-fCos(direction) * dx * msps) >> 20; cdy = (MUL(-fCos(direction), dx) * msps) >> 10;
if (!bonus->checkMask(x + cdx, y)) x += cdx; if (!bonus->checkMask(x + cdx, y)) x += cdx;
if (!bonus->checkMask(x, y + cdy)) y += cdy; if (!bonus->checkMask(x, y + cdy)) y += cdy;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment