From 707eee91479d537f3fb432511eeb36c16b30d80a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 21 Nov 2023 18:30:52 +0100 Subject: [PATCH] fix chembomb state sequence. --- source/games/sw/src/jweapon.cpp | 8 ++++++-- source/games/sw/src/sprite.cpp | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index c3a28ae68..2797d5aa1 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -147,9 +147,13 @@ FState s_RadiationCloud[] = #define CHEMBOMB_RATE 8 -FState s_ChemBomb[1] = +FState s_ChemBomb[5] = { - {SPR_CHEMBOMB, 'A', CHEMBOMB_RATE, &AF(DoChemBomb), &s_ChemBomb[1]}, + {SPR_CHEMBOMB, 'A', CHEMBOMB_RATE, &AF(DoChemBomb), &s_ChemBomb[0]}, + {SPR_CHEMBOMB, 'B', CHEMBOMB_RATE, &AF(DoChemBomb), &s_ChemBomb[1]}, + {SPR_CHEMBOMB, 'C', CHEMBOMB_RATE, &AF(DoChemBomb), &s_ChemBomb[2]}, + {SPR_CHEMBOMB, 'D', CHEMBOMB_RATE, &AF(DoChemBomb), &s_ChemBomb[3]}, + {SPR_CHEMBOMB, 'E', CHEMBOMB_RATE, &AF(DoChemBomb), &s_ChemBomb[0]}, }; diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index 177534c79..5130c6308 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -5981,8 +5981,8 @@ int StateControl(DSWActor* actor) // Set the correct pic if ((actor->user.State->Tics & SF_WALL_STATE)) // never used anywhere... { - ASSERT(actor->user.WallP); - actor->user.WallP->setwalltexture(picFromState(actor->user.State)); + if (actor->user.WallP) + actor->user.WallP->setwalltexture(picFromState(actor->user.State)); } else {