From 017e73a9e979597c77f0384fbc3194429d62fdf4 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 1 Apr 2024 14:25:45 +0200 Subject: [PATCH] Revert Dynamic slope flag --- src/dehacked.c | 4 ++-- src/p_slopes.c | 18 +++++++++--------- src/r_defs.h | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 8ed8585d..efba59b5 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -8543,8 +8543,8 @@ struct { {"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop. // Slope flags - {"SL_NOPHYSICS",SL_NOPHYSICS}, - {"SL_DYNAMIC",SL_DYNAMIC}, + {"SL_NOPHYSICS",SL_NOPHYSICS}, // Don't do momentum adjustment with this slope + {"SL_NODYNAMIC",SL_NODYNAMIC}, // Slope will never need to move during the level, so don't fuss with recalculating it // Angles {"ANG1",ANG1}, diff --git a/src/p_slopes.c b/src/p_slopes.c index 5a125662..a3d9880f 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -301,8 +301,8 @@ static void line_SpawnViaLine(const int linenum, const boolean spawnthinker) UINT8 flags = 0; // Slope flags if (line->flags & ML_NOSONIC) flags |= SL_NOPHYSICS; - if (line->flags & ML_NOTAILS) - flags |= SL_DYNAMIC; + if (!(line->flags & ML_NOTAILS)) + flags |= SL_NODYNAMIC; if(!frontfloor && !backfloor && !frontceil && !backceil) { @@ -366,7 +366,7 @@ static void line_SpawnViaLine(const int linenum, const boolean spawnthinker) P_CalculateSlopeNormal(fslope); - if (spawnthinker && (flags & SL_DYNAMIC)) + if (spawnthinker && !(flags & SL_NODYNAMIC)) P_AddDynSlopeThinker(fslope, DP_FRONTFLOOR, line, extent, NULL, NULL); } if(frontceil) @@ -383,7 +383,7 @@ static void line_SpawnViaLine(const int linenum, const boolean spawnthinker) P_CalculateSlopeNormal(cslope); - if (spawnthinker && (flags & SL_DYNAMIC)) + if (spawnthinker && !(flags & SL_NODYNAMIC)) P_AddDynSlopeThinker(cslope, DP_FRONTCEIL, line, extent, NULL, NULL); } } @@ -423,7 +423,7 @@ static void line_SpawnViaLine(const int linenum, const boolean spawnthinker) P_CalculateSlopeNormal(fslope); - if (spawnthinker && (flags & SL_DYNAMIC)) + if (spawnthinker && !(flags & SL_NODYNAMIC)) P_AddDynSlopeThinker(fslope, DP_BACKFLOOR, line, extent, NULL, NULL); } if(backceil) @@ -440,7 +440,7 @@ static void line_SpawnViaLine(const int linenum, const boolean spawnthinker) P_CalculateSlopeNormal(cslope); - if (spawnthinker && (flags & SL_DYNAMIC)) + if (spawnthinker && !(flags & SL_NODYNAMIC)) P_AddDynSlopeThinker(cslope, DP_BACKCEIL, line, extent, NULL, NULL); } } @@ -488,7 +488,7 @@ static pslope_t *MakeViaMapthings(INT16 tag1, INT16 tag2, INT16 tag3, UINT8 flag ReconfigureViaVertexes(ret, vx[0], vx[1], vx[2]); - if (spawnthinker && (flags & SL_DYNAMIC)) + if (spawnthinker && !(flags & SL_NODYNAMIC)) P_AddDynSlopeThinker(ret, DP_VERTEX, NULL, 0, tags, vx); return ret; @@ -505,8 +505,8 @@ static void line_SpawnViaVertexes(const int linenum, const boolean spawnthinker) UINT8 flags = 0; if (line->flags & ML_NOSONIC) flags |= SL_NOPHYSICS; - if (line->flags & ML_NOTAILS) - flags |= SL_DYNAMIC; + if (!(line->flags & ML_NOTAILS)) + flags |= SL_NODYNAMIC; switch(line->special) { diff --git a/src/r_defs.h b/src/r_defs.h index 19b541cd..04af2f00 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -222,7 +222,7 @@ typedef struct linechain_s // Slopes typedef enum { SL_NOPHYSICS = 1, /// This plane will have no physics applied besides the positioning. - SL_DYNAMIC = 1<<1, /// This plane slope will be assigned a thinker to make it dynamic. + SL_NODYNAMIC = 1<<1, // Slope will never need to move during the level, so don't fuss with recalculating it } slopeflags_t; typedef struct pslope_s