Fixed code in Set AI that would cause a switch break to be missed

This commit is contained in:
sirlemonhead 2019-10-29 22:17:04 +00:00 committed by Christoph Oelckers
parent 223d83e7be
commit bb821cf759

View file

@ -504,24 +504,21 @@ void FuncSet(int a, int nDamage, int nRun)
{ {
SetList[nSet].nAction = 0; SetList[nSet].nAction = 0;
SetList[nSet].field_A = 50; SetList[nSet].field_A = 50;
break;
} }
else else
{ {
if (PlotCourseToSprite(nSprite, nTarget) >= 768) if (PlotCourseToSprite(nSprite, nTarget) >= 768)
{ {
SetList[nSet].nAction = 3; SetList[nSet].nAction = 3;
break;
} }
else else if (nFlag & 0x80)
{ {
if (nFlag & 0x80) runlist_DamageEnemy(nTarget, nSprite, 5);
{
runlist_DamageEnemy(nTarget, nSprite, 5);
break;
}
} }
} }
break;
} }
case 5: case 5: