It turns out that being able to clip through these moving walls, as well as the glitch where the player ends up hovering in the air, are both DOS Duke3D bugs.
However, in DOS Duke3D, the player's sector does not get set to -1 once he moves off the glitched hover state, and instead he simply falls off and moves into the correct sector.
Therefore, the death bug is the only one that absolutely needs to be solved.
To investigate and possibly fix this issue, I have tried to simply comment out line 1002 of "clipupdatesector()" in clip.cpp, so that whenever *sectnum would be set to -1, it instead remains at the previous value.
Index: source/build/src/clip.cpp
===================================================================
--- source/build/src/clip.cpp (revision 8133)
+++ source/build/src/clip.cpp (working copy)
@@ -999,7 +999,7 @@
bfirst_search_try(sectlist, sectbitmap, &nsecs, uwal->nextsector);
}
- *sectnum = -1;
+ //*sectnum = -1;
}
//
This does solve the problem where the player dies when glitching off the platform in Sang's test map. However, while it does also prevent the death in E4L4, it also raises a completely new problem, where the player is now suddenly able to clip through the walls in the pool entirely.
This means that for some reason, entering the water in E4L4's spinning sector area causes the logic in "clipupdatesector()" to completely fail. With the unaltered r8133, this kills the player immediately as the sectnum is set to -1 as soon as he enters the water.
However, if we swim down to the floor of the spinning sector, the player becomes corporeal again, and wall collision applies to him once more. There is something very strange going on with the sector teleportation effect of the water, combined with the rotating sector floor contained in it.
Even more curiously,
by removing the assignment shown above, we actually also directly address the issue where actors cannot pass TROR barriers, as described here: https://forums.duke4...-tror-barriers/
With regular r8133, the Enforcer simply gets stuck on the seam of the slope and can no longer be shot -- with the above commented out, his sprite disappears for a split second, but otherwise he's able to pass it unhindered again.
So in summary, the death bug reported in this thread, the death bug in E4L4, as well as the issue where actors cannot move across TROR edges all seem to stem from the same function "clipupdatesector()" (or at least from what's occurring in clipmove())