dont apply this for players

This commit is contained in:
Alug committed 2024-02-19 18:20:11 +01:00
1 parent fe0dabb177
commit acb6e30fad
1 file changed
+20 -4
+20 -4
View File
@@ -791,8 +791,16 @@ fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t
testy += y;
// If the highest point is in the sector, then we have it easy! Just get the Z at that point
if (R_IsPointInSector(boundsec ? boundsec : sector, testx, testy))
return P_GetZAt(slope, testx, testy);
if (mobj->player)
{
if (R_PointInSubsector(testx, testy)->sector == (boundsec ? boundsec : sector))
return P_GetZAt(slope, testx, testy);
}
else
{
if (R_IsPointInSector(boundsec ? boundsec : sector, testx, testy))
return P_GetZAt(slope, testx, testy);
}
// If boundsec is set, we're looking for specials. In that case, iterate over every line in this sector to find the TRUE highest/lowest point
if (perfect) {
@@ -867,8 +875,16 @@ fixed_t P_MobjCeilingZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed
testy += y;
// If the highest point is in the sector, then we have it easy! Just get the Z at that point
if (R_IsPointInSector(boundsec ? boundsec : sector, testx, testy))
return P_GetZAt(slope, testx, testy);
if (mobj->player)
{
if (R_PointInSubsector(testx, testy)->sector == (boundsec ? boundsec : sector))
return P_GetZAt(slope, testx, testy);
}
else
{
if (R_IsPointInSector(boundsec ? boundsec : sector, testx, testy))
return P_GetZAt(slope, testx, testy);
}
// If boundsec is set, we're looking for specials. In that case, iterate over every line in this sector to find the TRUE highest/lowest point
if (perfect) {