fabiangreffrath / crispy-doom

Crispy Doom is a limit-removing enhanced-resolution Doom source port based on Chocolate Doom.
https://fabiangreffrath.github.io/crispy-homepage
GNU General Public License v2.0
802 stars 132 forks source link

Disable Instant-Raise/Lower Sector Interpolation #965

Closed OpenRift412 closed 1 year ago

OpenRift412 commented 1 year ago

Was playing a certain WAD and noticed in the title demo (MAP17) that the instant-raising/lowering sectors trick is interpolated, ruining certain effects. This seems to be an issue exclusive to Crispy, as Woof and PrBoom-plus UMAPINFO don't seem to do this.

mikeday0 commented 1 year ago

One possible fix, adapted from Woof! and prboom-plus:

diff --git a/src/doom/r_bsp.c b/src/doom/r_bsp.c
index 5a449f01..3c047ec5 100644
--- a/src/doom/r_bsp.c
+++ b/src/doom/r_bsp.c
@@ -256,7 +256,8 @@ void R_MaybeInterpolateSector(sector_t* sector)
 {
     if (crispy->uncapped &&
         // Only if we moved the sector last tic.
-        sector->oldgametic == gametic - 1)
+        sector->oldgametic == gametic - 1 &&
+        sector->specialdata)
     {
         // Interpolate between current and last floor/ceiling position.
         if (sector->floorheight != sector->oldfloorheight)

This takes care of the issue with KDiKDi but I'm wondering if it might break something else. @fabiangreffrath Any thoughts?

fabiangreffrath commented 1 year ago

Looks reasonable, PR please. 👍