mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-17 10:11:02 +00:00
Okay, actually fixed. Thanks, MI, for understanding the maths a little better than I :p
This commit is contained in:
parent
1e1d191a75
commit
021e7ed1f0
1 changed files with 8 additions and 4 deletions
10
src/p_map.c
10
src/p_map.c
|
@ -988,10 +988,14 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
fixed_t bottomz, topz;
|
fixed_t bottomz, topz;
|
||||||
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))
|
||||||
&& (tmthing->momx || tmthing->momy)
|
{
|
||||||
&& (R_PointToAngle2(0, 0, tmthing->momx, tmthing->momy) - touchangle) > ANGLE_180)
|
angle_t playerangle = R_PointToAngle2(0, 0, tmthing->momx, tmthing->momy) - touchangle;
|
||||||
|
if (playerangle > ANGLE_180)
|
||||||
|
playerangle = InvAngle(playerangle);
|
||||||
|
if (playerangle < ANGLE_90)
|
||||||
return true; // Yes, this is intentionally outside the z-height check. No standing on spikes whilst moving away from them.
|
return true; // Yes, this is intentionally outside the z-height check. No standing on spikes whilst moving away from them.
|
||||||
|
}
|
||||||
|
|
||||||
bottomz = thing->z;
|
bottomz = thing->z;
|
||||||
topz = thing->z + thing->height;
|
topz = thing->z + thing->height;
|
||||||
|
|
Loading…
Reference in a new issue