From bb821cf759d8b26ff0537fe7f1d3ef64cce321c9 Mon Sep 17 00:00:00 2001 From: sirlemonhead Date: Tue, 29 Oct 2019 22:17:04 +0000 Subject: [PATCH] Fixed code in Set AI that would cause a switch break to be missed --- source/exhumed/src/set.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/source/exhumed/src/set.cpp b/source/exhumed/src/set.cpp index ca27a10c6..bfd431b33 100644 --- a/source/exhumed/src/set.cpp +++ b/source/exhumed/src/set.cpp @@ -504,24 +504,21 @@ void FuncSet(int a, int nDamage, int nRun) { SetList[nSet].nAction = 0; SetList[nSet].field_A = 50; - break; } else { if (PlotCourseToSprite(nSprite, nTarget) >= 768) { SetList[nSet].nAction = 3; - break; } - else + else if (nFlag & 0x80) { - if (nFlag & 0x80) - { - runlist_DamageEnemy(nTarget, nSprite, 5); - break; - } + runlist_DamageEnemy(nTarget, nSprite, 5); + } } + + break; } case 5: