by Cacodemon345 » Fri Aug 31, 2018 8:36 am
I just noticed this in GZDoom's code in P_BounceActor method. In line 3644 of p_map.cpp:
Code: Select all
if (!ontop)
{
DAngle angle = BlockingMobj->AngleTo(mo) + ((pr_bounce() % 16) - 8);
double speed = mo->VelXYToSpeed() * mo->wallbouncefactor; // [GZ] was 0.75, using wallbouncefactor seems more consistent
if (fabs(speed) < EQUAL_EPSILON) speed = 0;
mo->Angles.Yaw = angle;
mo->VelFromAngle(speed);
mo->PlayBounceSound(true);
if (mo->BounceFlags & BOUNCE_UseBounceState)
The code for the Bounce State entering is under the if statement and does not exist in the else statement, causing bug.
I just noticed this in GZDoom's code in P_BounceActor method. In line 3644 of p_map.cpp:
[code] if (!ontop)
{
DAngle angle = BlockingMobj->AngleTo(mo) + ((pr_bounce() % 16) - 8);
double speed = mo->VelXYToSpeed() * mo->wallbouncefactor; // [GZ] was 0.75, using wallbouncefactor seems more consistent
if (fabs(speed) < EQUAL_EPSILON) speed = 0;
mo->Angles.Yaw = angle;
mo->VelFromAngle(speed);
mo->PlayBounceSound(true);
if (mo->BounceFlags & BOUNCE_UseBounceState)
[/code]The code for the Bounce State entering is under the if statement and does not exist in the else statement, causing bug.