From fe42de1fcb631e8440e7f4aa04843e0f21ed02e2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 22 Aug 2022 18:56:48 +0200 Subject: [PATCH] - the one add_int_floorz/add_int_ceilingz calls each in SW. --- source/games/sw/src/sprite.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index cdc6e441b..7b26bcdba 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -2046,11 +2046,10 @@ void SpriteSetup(void) actor->user.z_tgt = actor->spr.pos.Z; if (start_on) { - int amt; - amt = actor->int_pos().Z - sectp->int_floorz(); + int amt = actor->int_pos().Z - sectp->int_floorz(); // start in the on position - sectp->add_int_floorz(amt); + sectp->setfloorz(actor->spr.pos.Z); actor->user.z_tgt = actor->user.pos.Z; MoveSpritesWithSector(actor->sector(), amt, false); // floor @@ -2071,7 +2070,7 @@ void SpriteSetup(void) amt = actor->int_pos().Z - sectp->int_ceilingz(); // starting in the on position - sectp->add_int_ceilingz(amt); + sectp->setceilingz(actor->spr.pos.Z); actor->user.z_tgt = actor->user.pos.Z; MoveSpritesWithSector(actor->sector(), amt, true); // ceiling