From 3658b22a7f6d54206d7d81cc90721f652e68aa42 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 3 Jun 2017 14:46:03 +0100 Subject: [PATCH 1/2] wallVerts[].y is actually the map z coord, so use wallVerts[].z instead (which is actually the map y coord) Don't worry I'm not going mad, this is actually how it's supposed to be --- src/hardware/hw_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 45b59f9b..fe04a2c4 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -1084,9 +1084,9 @@ static void HWR_SplitWall(sector_t *sector, wallVert3D *wallVerts, INT32 texnum, float endheight = 0.0f, endbheight = 0.0f; fixed_t v1x = FLOAT_TO_FIXED(wallVerts[0].x); - fixed_t v1y = FLOAT_TO_FIXED(wallVerts[0].y); + fixed_t v1y = FLOAT_TO_FIXED(wallVerts[0].z); // not a typo fixed_t v2x = FLOAT_TO_FIXED(wallVerts[1].x); - fixed_t v2y = FLOAT_TO_FIXED(wallVerts[1].y); + fixed_t v2y = FLOAT_TO_FIXED(wallVerts[1].z); // not a typo // compiler complains when P_GetZAt is used in FLOAT_TO_FIXED directly // use this as a temp var to store P_GetZAt's return value each time fixed_t temp; From c3c85bb4d2a4e5a1e39b999aadf919c55973e8c4 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 3 Jun 2017 17:47:46 +0100 Subject: [PATCH 2/2] Do not draw segs that belong to polyobjects, if you're drawing subsectors adjacent to them Polyobject segs should ONLY be drawn if the polyobject itself is in the polylist of a subsector being rendered. That way you won't sometimes see polyobject walls through level boundaries, if you happen to be close enough to their pre-spawn locations outside the level (or in them, if you decided to go on a noclip journey). --- src/hardware/hw_main.c | 3 +++ src/r_bsp.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 45b59f9b..e0461071 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3722,6 +3722,9 @@ static void HWR_Subsector(size_t num) while (count--) { +#ifdef POLYOBJECTS + if (!line->polyseg) // ignore segs that belong to polyobjects +#endif HWR_AddLine(line); line++; } diff --git a/src/r_bsp.c b/src/r_bsp.c index 44cb991a..abb11204 100644 --- a/src/r_bsp.c +++ b/src/r_bsp.c @@ -1222,6 +1222,9 @@ static void R_Subsector(size_t num) while (count--) { // CONS_Debug(DBG_GAMELOGIC, "Adding normal line %d...(%d)\n", line->linedef-lines, leveltime); +#ifdef POLYOBJECTS + if (!line->polyseg) // ignore segs that belong to polyobjects +#endif R_AddLine(line); line++; curline = NULL; /* cph 2001/11/18 - must clear curline now we're done with it, so stuff doesn't try using it for other things */