fixed: bouncing on actors neither checked nor changed mo->bouncecount.

SVN r3506 (trunk)
This commit is contained in:
Christoph Oelckers 2012-04-01 11:02:05 +00:00
parent 64f14f8d18
commit 92a8f8518c

View file

@ -2846,6 +2846,8 @@ bool P_BounceActor (AActor *mo, AActor * BlockingMobj)
)) ))
{ {
fixed_t speed; fixed_t speed;
if (mo->bouncecount > 0 && --mo->bouncecount > 0)
{
angle_t angle = R_PointToAngle2 (BlockingMobj->x, angle_t angle = R_PointToAngle2 (BlockingMobj->x,
BlockingMobj->y, mo->x, mo->y) + ANGLE_1*((pr_bounce()%16)-8); BlockingMobj->y, mo->x, mo->y) + ANGLE_1*((pr_bounce()%16)-8);
speed = P_AproxDistance (mo->velx, mo->vely); speed = P_AproxDistance (mo->velx, mo->vely);
@ -2857,7 +2859,8 @@ bool P_BounceActor (AActor *mo, AActor * BlockingMobj)
mo->PlayBounceSound(true); mo->PlayBounceSound(true);
return true; return true;
} }
else return false; }
return false;
} }
//============================================================================ //============================================================================