diff --git a/extras/conf/udb/Includes/SRB222_misc.cfg b/extras/conf/udb/Includes/SRB222_misc.cfg index e274fece69ea37d4be43cd8b7560fde69e181ee5..ce85d08b1b68683d6537e82aebdd0eec4cda9be8 100644 --- a/extras/conf/udb/Includes/SRB222_misc.cfg +++ b/extras/conf/udb/Includes/SRB222_misc.cfg @@ -78,6 +78,8 @@ sectorflags ropehang = "Rope Hang"; jumpflip = "Flip Gravity on Jump"; gravityoverride = "Make Reverse Gravity Temporary"; + nophysics_floor = "Disable Floor Slope Physics"; + nophysics_ceiling = "Disable Ceiling Slope Physics"; flipspecial_nofloor = "No Trigger on Floor Touch"; flipspecial_ceiling = "Trigger on Ceiling Touch"; triggerspecial_touch = "Trigger on Edge Touch"; @@ -114,6 +116,8 @@ sectorflagscategories ropehang = "special"; jumpflip = "special"; gravityoverride = "special"; + nophysics_floor = "special"; + nophysics_ceiling = "special"; flipspecial_nofloor = "trigger"; flipspecial_ceiling = "trigger"; triggerspecial_touch = "trigger"; diff --git a/src/p_setup.c b/src/p_setup.c index 74645e8771c8055a8719de438cee252b05ba7364..7dda2be1f1fa16e1607b85dadb578f4a472d6631 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1731,6 +1731,10 @@ static void ParseTextmapSectorParameter(UINT32 i, const char *param, const char sectors[i].specialflags |= SSF_JUMPFLIP; else if (fastcmp(param, "gravityoverride") && fastcmp("true", val)) sectors[i].specialflags |= SSF_GRAVITYOVERRIDE; + else if (fastcmp(param, "nophysics_floor") && fastcmp("true", val)) + sectors[i].specialflags |= SSF_NOPHYSICSFLOOR; + else if (fastcmp(param, "nophysics_ceiling") && fastcmp("true", val)) + sectors[i].specialflags |= SSF_NOPHYSICSCEILING; else if (fastcmp(param, "friction")) sectors[i].friction = FLOAT_TO_FIXED(atof(val)); else if (fastcmp(param, "gravity")) @@ -2785,12 +2789,16 @@ static void P_LoadTextmap(void) { sc->f_slope = MakeViaEquationConstants(textmap_planefloor.a, textmap_planefloor.b, textmap_planefloor.c, textmap_planefloor.d); sc->hasslope = true; + if (sc->specialflags & SSF_NOPHYSICSFLOOR) + sc->f_slope->flags |= SL_NOPHYSICS|SL_DYNAMIC; } if (textmap_planeceiling.defined == (PD_A|PD_B|PD_C|PD_D)) { sc->c_slope = MakeViaEquationConstants(textmap_planeceiling.a, textmap_planeceiling.b, textmap_planeceiling.c, textmap_planeceiling.d); sc->hasslope = true; + if (sc->specialflags & SSF_NOPHYSICSCEILING) + sc->c_slope->flags |= SL_NOPHYSICS|SL_DYNAMIC; } TextmapFixFlatOffsets(sc); diff --git a/src/r_defs.h b/src/r_defs.h index 6d2b7d3d8ab0f1e2db9932e26c6e1ee188f218bb..fbc1c7721ee0cf909db67305afd4099bbfbd3e08 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -357,6 +357,8 @@ typedef enum SSF_ROPEHANG = 1<<18, SSF_JUMPFLIP = 1<<19, SSF_GRAVITYOVERRIDE = 1<<20, // combine with MSF_GRAVITYFLIP + SSF_NOPHYSICSFLOOR = 1<<21, + SSF_NOPHYSICSCEILING = 1<<22, } sectorspecialflags_t; typedef enum