mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- fixed: The bounce on actors check handled infinite bouncers (bouncecount == 0) incorrectly.
SVN r3521 (trunk)
This commit is contained in:
parent
f6817f9544
commit
35f0b32a7f
1 changed files with 12 additions and 13 deletions
|
@ -2845,9 +2845,9 @@ bool P_BounceActor (AActor *mo, AActor * BlockingMobj)
|
||||||
|| ((BlockingMobj->player == NULL) && (!(BlockingMobj->flags3 & MF3_ISMONSTER)))
|
|| ((BlockingMobj->player == NULL) && (!(BlockingMobj->flags3 & MF3_ISMONSTER)))
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
|
if (mo->bouncecount > 0 && --mo->bouncecount == 0) return false;
|
||||||
|
|
||||||
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);
|
||||||
|
@ -2859,7 +2859,6 @@ bool P_BounceActor (AActor *mo, AActor * BlockingMobj)
|
||||||
mo->PlayBounceSound(true);
|
mo->PlayBounceSound(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue