Duke3D: Actors can't be crushed in sloped lotag 1 sectors
This problem originates from r5657:
commit 4795b68823df59c0c15f9d88d97bcc59b6a2d61e
Author: Richard Gobeille <terminx@gmail.com>
Date: Mon Mar 14 00:07:12 2016 +0000
Don't squish the player in lotag 1 sectors that have a SE7.
From-SVN: r5657
It was caused by a misinterpretation of the function "A_CheckNoSE7Water()":
diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c
index 214743a29..f8813967a 100644
--- a/polymer/eduke32/source/gameexec.c
+++ b/polymer/eduke32/source/gameexec.c
@@ -239,26 +239,27 @@ static int32_t VM_CheckSquished(void)
{
sectortype const * const sc = §or[vm.g_sp->sectnum];
- if (sc->lotag == ST_23_SWINGING_DOOR || EDUKE32_PREDICT_FALSE(vm.g_sp->picnum == APLAYER && ud.noclip))
+ if (sc->lotag == ST_23_SWINGING_DOOR ||
+ (sc->lotag == ST_1_ABOVE_WATER && !A_CheckNoSE7Water(vm.g_sp, vm.g_sp->sectnum, sc->lotag, NULL)) ||
+ (vm.g_sp->picnum == APLAYER && ud.noclip))
return 0;
This is a TROR-specific function, which return 1 if the sector contains a floor bunch that the player can submerge into (i.e. submergible TROR water that does not use SE7), and 0 otherwise.
Therefore, this prevents actors from being crushed if the actor is in a lotag 1 sector that isn't submergible TROR water. Therefore, any regular lotag 1 sectors, with or without SE7, prevent crushing -- contrary to what the commit message states.,
Furthermore, the actor will get crushed on submergible TROR water -- which is also a case that shouldn't actually be occurring.
Crushers in lotag 1 sectors without SE7, (in other words, shallow water) should still allow crushing. This was the behavior in DOS Duke3D, and also the behavior in eduke32 up and until r5657 in 2016.
The following map (cut out of E1L7) demonstrates the problem:
Fixing this of course comes with a caveat: In the 7 years since this change was introduced, maps may have been created that rely on this bug to allow player progression. In other words, maps since 2016 may have assumed that it is safe for the player to walk through crusher areas with water floors.