From 6787dfeafb7ae34b33b1ed2928d6f431a646ed33 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 8 Mar 2016 16:01:26 +0100 Subject: [PATCH 1/5] - updated xlat/eternity.txt --- wadsrc/static/xlat/eternity.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/wadsrc/static/xlat/eternity.txt b/wadsrc/static/xlat/eternity.txt index 2a13d3b4f..0199b8348 100644 --- a/wadsrc/static/xlat/eternity.txt +++ b/wadsrc/static/xlat/eternity.txt @@ -112,11 +112,11 @@ enum 342 = 0, Stairs_BuildUpDoomSync(0) 343 = 0, Stairs_BuildDownDoomSync(0) -// Two-way portals are not supported yet either -344 = 0, Unsupported() // "Portal_TwowayCeiling" -345 = 0, Unsupported() // "Portal_TwowayFloor" -346 = 0, Unsupported() // "Portal_TwowayAnchorLine" -347 = 0, Unsupported() // "Portal_TwowayAnchorLineFloor" +// Two-way portals are just the same as the simple types. +344 = 0, Sector_SetPortal(tag, 0, 1, 1, 0) // "Portal_AnchoredCeiling" +345 = 0, Sector_SetPortal(tag, 0, 0, 1, 0) // "Portal_AnchoredFloor" +346 = 0, Sector_SetPortal(tag, 0, 1, 0, 0) // "Portal_AnchorLine" +347 = 0, Sector_SetPortal(tag, 0, 0, 0, 0) // "Portal_AnchorLineFloor" // More parameterized linedefs 348 = 0, Polyobj_StartLine(0) @@ -215,3 +215,6 @@ enum 428 = 0, Thing_Destroy(0) 429 = 0, Door_LockedRaise(0) 430 = 0, ACS_LockedExecute(0) +431 = 0, Floor_Donut(0) +432 = 0, Ceiling_CrushAndRaise(0) +433 = 0, Ceiling_CrushStop(0) From 7c47e6ddb23fe139954761d0289e3a41865f16a8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 8 Mar 2016 16:05:53 +0100 Subject: [PATCH 2/5] - how about updating the reference first before adding this stuff... Overlooked those two because my Eternity repo was not fully up to date. --- wadsrc/static/xlat/eternity.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wadsrc/static/xlat/eternity.txt b/wadsrc/static/xlat/eternity.txt index 0199b8348..879485d40 100644 --- a/wadsrc/static/xlat/eternity.txt +++ b/wadsrc/static/xlat/eternity.txt @@ -218,3 +218,5 @@ enum 431 = 0, Floor_Donut(0) 432 = 0, Ceiling_CrushAndRaise(0) 433 = 0, Ceiling_CrushStop(0) +434 = 0, Ceiling_CrushRaiseAndStay(0) +435 = 0, Ceiling_LowerAndCrush(0) From 42521ffd6f49e70955cf9c89379914ccecb60297 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 8 Mar 2016 18:34:58 +0100 Subject: [PATCH 3/5] - fixed some mixed up variables in a few blockmap iterators. --- src/g_hexen/a_spike.cpp | 2 +- src/p_map.cpp | 4 ++-- src/r_bsp.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/g_hexen/a_spike.cpp b/src/g_hexen/a_spike.cpp index 10444ecb9..3943bee30 100644 --- a/src/g_hexen/a_spike.cpp +++ b/src/g_hexen/a_spike.cpp @@ -161,7 +161,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ThrustImpale) while (it.Next(&cres)) { fixed_t blockdist = self->radius + cres.thing->radius; - if (abs(self->X() - cres.position.x) >= blockdist || abs(self->Y() - cres.position.y) >= blockdist) + if (abs(cres.thing->X() - cres.position.x) >= blockdist || abs(cres.thing->Y() - cres.position.y) >= blockdist) continue; // Q: Make this z-aware for everything? It never was before. diff --git a/src/p_map.cpp b/src/p_map.cpp index 8174d8e77..a277c7b77 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -5527,7 +5527,7 @@ void P_FindAboveIntersectors(AActor *actor) { AActor *thing = cres.thing; fixed_t blockdist = actor->radius + thing->radius; - if (abs(actor->X() - cres.position.x) >= blockdist || abs(actor->Y() - cres.position.y) >= blockdist) + if (abs(thing->X() - cres.position.x) >= blockdist || abs(thing->Y() - cres.position.y) >= blockdist) continue; if (!(thing->flags & MF_SOLID)) @@ -5583,7 +5583,7 @@ void P_FindBelowIntersectors(AActor *actor) { AActor *thing = cres.thing; fixed_t blockdist = actor->radius + thing->radius; - if (abs(actor->X() - cres.position.x) >= blockdist || abs(actor->Y() - cres.position.y) >= blockdist) + if (abs(thing->X() - cres.position.x) >= blockdist || abs(thing->Y() - cres.position.y) >= blockdist) continue; if (!(thing->flags & MF_SOLID)) diff --git a/src/r_bsp.cpp b/src/r_bsp.cpp index 97ac7e5e3..861040cf0 100644 --- a/src/r_bsp.cpp +++ b/src/r_bsp.cpp @@ -1092,7 +1092,7 @@ void R_Subsector (subsector_t *sub) basecolormap = frontsector->ColorMap; } - skybox = frontsector->GetSkyBox(sector_t::ceiling); + skybox = NULL;// frontsector->GetSkyBox(sector_t::ceiling); if (skybox != NULL && skybox->special1 >= SKYBOX_PLANE) skybox = NULL; // skip unsupported portal types ceilingplane = frontsector->ceilingplane.PointOnSide(viewx, viewy, viewz) > 0 || @@ -1134,7 +1134,7 @@ void R_Subsector (subsector_t *sub) // killough 3/7/98: Add (x,y) offsets to flats, add deep water check // killough 3/16/98: add floorlightlevel // killough 10/98: add support for skies transferred from sidedefs - skybox = frontsector->GetSkyBox(sector_t::floor); + skybox = NULL;// frontsector->GetSkyBox(sector_t::floor); if (skybox != NULL && skybox->special1 >= SKYBOX_PLANE) skybox = NULL; // skip unsupported portal types floorplane = frontsector->floorplane.PointOnSide(viewx, viewy, viewz) > 0 || // killough 3/7/98 From 0a1e22aa7a5b10b651252f9da728e618b688edd9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 8 Mar 2016 18:45:52 +0100 Subject: [PATCH 4/5] - fixed: FPathTraverse::init kills the intercepts array so PortalRelocate needs to store the line before calling that function. --- src/p_maputl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index b9d682e6e..55ce03470 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -1677,9 +1677,10 @@ int FPathTraverse::PortalRelocate(intercept_t *in, int flags, fixedvec3 *optpos) P_TranslatePortalXY(in->d.line, optpos->x, optpos->y); P_TranslatePortalZ(in->d.line, optpos->z); } + line_t *saved = in->d.line; // this gets overwriitten by the init call. intercepts.Resize(intercept_index); init(hitx, hity, endx, endy, flags, in->frac); - return in->d.line->getPortal()->mType == PORTT_LINKED? 1:-1; + return saved->getPortal()->mType == PORTT_LINKED? 1:-1; } //=========================================================================== From 015cbb1061dbc3513269aa9a2bb24a0d12d54a8d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 8 Mar 2016 21:29:13 +0100 Subject: [PATCH 5/5] - revert accidentally committed debug code. --- src/r_bsp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_bsp.cpp b/src/r_bsp.cpp index 861040cf0..97ac7e5e3 100644 --- a/src/r_bsp.cpp +++ b/src/r_bsp.cpp @@ -1092,7 +1092,7 @@ void R_Subsector (subsector_t *sub) basecolormap = frontsector->ColorMap; } - skybox = NULL;// frontsector->GetSkyBox(sector_t::ceiling); + skybox = frontsector->GetSkyBox(sector_t::ceiling); if (skybox != NULL && skybox->special1 >= SKYBOX_PLANE) skybox = NULL; // skip unsupported portal types ceilingplane = frontsector->ceilingplane.PointOnSide(viewx, viewy, viewz) > 0 || @@ -1134,7 +1134,7 @@ void R_Subsector (subsector_t *sub) // killough 3/7/98: Add (x,y) offsets to flats, add deep water check // killough 3/16/98: add floorlightlevel // killough 10/98: add support for skies transferred from sidedefs - skybox = NULL;// frontsector->GetSkyBox(sector_t::floor); + skybox = frontsector->GetSkyBox(sector_t::floor); if (skybox != NULL && skybox->special1 >= SKYBOX_PLANE) skybox = NULL; // skip unsupported portal types floorplane = frontsector->floorplane.PointOnSide(viewx, viewy, viewz) > 0 || // killough 3/7/98