From c72f5e22424bbfb1ad5ac560ac9b37c28cda9f4a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 29 Dec 2022 14:40:18 +0100 Subject: [PATCH] - SW: SECT_WALL_MOVE must consider tilenum 0 as 'no change'. --- source/games/sw/src/sprite.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index 8caa8a422..404d8d068 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -2516,8 +2516,9 @@ void SpriteSetup(void) case SECT_WALL_MOVE: - if (SP_TAG5(actor) >= 0 && !actor->texparam.isValid()) actor->texparam = tileGetTextureID(SP_TAG5(actor)); - if (SP_TAG6(actor) >= 0 && !actor->texparam.isValid()) actor->texparam2 = tileGetTextureID(SP_TAG6(actor)); + // this type considers tilenum 0 invalid. + if (SP_TAG5(actor) > 0 && !actor->texparam.isValid()) actor->texparam = tileGetTextureID(SP_TAG5(actor)); + if (SP_TAG6(actor) > 0 && !actor->texparam.isValid()) actor->texparam2 = tileGetTextureID(SP_TAG6(actor)); change_actor_stat(actor, STAT_WALL_MOVE); break; case SECT_WALL_MOVE_CANSEE: