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:
parent
d1be22ccf5
commit
2330f1a9c9
|
@ -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);
|
angle_t touchangle = R_PointToAngle2(thing->tracer->x, thing->tracer->y, tmthing->x, tmthing->y);
|
||||||
|
|
||||||
if (P_PlayerInPain(tmthing->player)
|
if (P_PlayerInPain(tmthing->player)
|
||||||
|
&& (tmthing->momx || tmthing->momy)
|
||||||
&& (R_PointToAngle2(0, 0, tmthing->momx, tmthing->momy) - touchangle) > ANGLE_180)
|
&& (R_PointToAngle2(0, 0, tmthing->momx, tmthing->momy) - touchangle) > ANGLE_180)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue