From e3363b88a06e2b7c4c2e7a112d6fc5c34d64a58e Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 25 Jul 2026 09:21:01 +0200 Subject: [PATCH] delet this --- src/p_local.h | 1 - src/p_mobj.c | 34 ++-------------------------------- src/p_setup.c | 2 -- 3 files changed, 2 insertions(+), 35 deletions(-) diff --git a/src/p_local.h b/src/p_local.h index e07514110..8c52407b3 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -302,7 +302,6 @@ FUNCINLINE static ATTRINLINE boolean P_MobjWasRemovedCompat(const mobj_t *mobj) #endif } -void Reset_Zsubsecs(void); fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect); fixed_t P_MobjCeilingZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect); #define P_GetFloorZ(mobj, sector, x, y, line) P_MobjFloorZ(mobj, sector, NULL, x, y, line, false, false) diff --git a/src/p_mobj.c b/src/p_mobj.c index 0b4dba781..655d1df35 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -540,24 +540,6 @@ static fixed_t HighestOnLine(fixed_t radius, fixed_t x, fixed_t y, line_t *line, } } -// save us buncha R_PointInSubsector calls -// 0 is floor, 1 is ceiling -static subsector_t *Zsubsectors[2]; -static fixed_t Zoldx[2]; -static fixed_t Zoldy[2]; - -// make sure to reset that crap on levelload -void Reset_Zsubsecs(void) -{ - for (int i = 0; i < 2; i++) - { - Zsubsectors[i] = NULL; - // theres a super unlikely chance you spawn at x = 2147483647 and y = 2147483647 on some map - // but prob a fuckton less likely than spawning at 0 0 - Zoldx[i] = Zoldy[i] = INT32_MAX; - } -} - fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect) { I_Assert(mobj != NULL); @@ -588,14 +570,8 @@ fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t testx += x; testy += y; - if (Zsubsectors[0] == NULL || Zoldx[0] != testx || Zoldy[0] != testy) - Zsubsectors[0] = R_PointInSubsector(testx, testy); - - Zoldx[0] = testx; - Zoldy[0] = testy; - // If the highest point is in the sector, then we have it easy! Just get the Z at that point - if (Zsubsectors[0]->sector == (boundsec ? boundsec : sector)) + if (R_PointInSubsector(testx, testy)->sector == (boundsec ? boundsec : sector)) return P_GetSlopeZAt(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 @@ -683,14 +659,8 @@ fixed_t P_MobjCeilingZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed testx += x; testy += y; - if (Zsubsectors[1] == NULL || Zoldx[1] != testx || Zoldy[1] != testy) - Zsubsectors[1] = R_PointInSubsector(testx, testy); - - Zoldx[1] = testx; - Zoldy[1] = testy; - // If the highest point is in the sector, then we have it easy! Just get the Z at that point - if (Zsubsectors[1]->sector == (boundsec ? boundsec : sector)) + if (R_PointInSubsector(testx, testy)->sector == (boundsec ? boundsec : sector)) return P_GetSlopeZAt(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 diff --git a/src/p_setup.c b/src/p_setup.c index 0996ccaac..cfbc85957 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2988,8 +2988,6 @@ boolean P_SetupLevel(boolean fromnetsave, boolean reloadinggamestate) lumpnum_t encoreLump = LUMPERROR; const mapheader_t *mapheader = mapheaderinfo[gamemap - 1]; - Reset_Zsubsecs(); - midgamejoin = fromnetsave; // makes dynslopes run in P_Ticker to avoid synch issues and other stuff levelloading = true;