Account for the fact that pointtoangle2 points due weast if there's no dy OR dx, so that's taken care of.

This commit is contained in:
toasterbabe 2017-07-18 14:17:10 +01:00
parent d1be22ccf5
commit 2330f1a9c9
1 changed files with 1 additions and 0 deletions

View File

@ -992,6 +992,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
angle_t touchangle = R_PointToAngle2(thing->tracer->x, thing->tracer->y, tmthing->x, tmthing->y);
if (P_PlayerInPain(tmthing->player)
&& (tmthing->momx || tmthing->momy)
&& (R_PointToAngle2(0, 0, tmthing->momx, tmthing->momy) - touchangle) > ANGLE_180)
return true;