From 1f489d5dbec73f397023474ca08962e886874bae Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 8 Jan 2023 22:12:50 +1100 Subject: [PATCH] - SW: Don't back up the actor's Z after changing it in `KeepActorOnFloor()`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * This seems completely wrong and kills Z interpolation on slopes, vators, etc. * Thanks Graf 😁 * Fixes #844. * Partially addresses #845. --- source/games/sw/src/actor.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index 2517730f2..3017a68fb 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -549,7 +549,6 @@ void KeepActorOnFloor(DSWActor* actor) actor->user.Flags &= ~(SPR_SWIMMING); actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER); actor->spr.pos.Z = actor->user.oz = actor->user.loz; - actor->backupz(); return; } @@ -560,7 +559,6 @@ void KeepActorOnFloor(DSWActor* actor) // are swimming actor->spr.pos.Z = actor->user.oz = actor->user.loz - depth; - actor->backupz(); } else { @@ -569,7 +567,6 @@ void KeepActorOnFloor(DSWActor* actor) { NewStateGroup(actor, actor->user.ActorActionSet->Swim); actor->spr.pos.Z = actor->user.oz = actor->user.loz - depth; - actor->backupz(); actor->user.Flags |= (SPR_SWIMMING); actor->spr.cstat |= (CSTAT_SPRITE_YCENTER); } @@ -578,7 +575,6 @@ void KeepActorOnFloor(DSWActor* actor) actor->user.Flags &= ~(SPR_SWIMMING); actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER); actor->spr.pos.Z = actor->user.oz = actor->user.loz; - actor->backupz(); } } @@ -593,7 +589,6 @@ void KeepActorOnFloor(DSWActor* actor) if (actor->user.Flags & (SPR_MOVED)) { actor->spr.pos.Z = actor->user.oz = actor->user.loz; - actor->backupz(); } else { @@ -602,7 +597,6 @@ void KeepActorOnFloor(DSWActor* actor) FAFgetzrangepoint(actor->spr.pos, actor->sector(),&ceilz, &ctrash, &florz, &ftrash); actor->spr.pos.Z = actor->user.oz = florz; - actor->backupz(); } #endif }