From 34126a50be78983a654c593a873b8fcdf04a7f4b Mon Sep 17 00:00:00 2001 From: "Richard C. Gobeille" Date: Sun, 10 May 2020 19:02:43 -0700 Subject: [PATCH] Duke3d: change random_angle hack in CON_MOVE to match CON_AI --- source/duke3d/src/gameexec.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index 4f53e3e27..e6f593eff 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -3519,10 +3519,10 @@ badindex: AC_COUNT(vm.pData) = 0; AC_MOVE_ID(vm.pData) = *insptr++; vm.pSprite->hitag = *insptr++; - if (A_CheckEnemySprite(vm.pSprite) && vm.pSprite->extra <= 0) // hack - dispatch(); - if (vm.pSprite->hitag & random_angle) - vm.pSprite->ang = krand() & 2047; + + if (!A_CheckEnemySprite(vm.pSprite) || vm.pSprite->extra > 0) // hack + if (vm.pSprite->hitag & random_angle) + vm.pSprite->ang = krand() & 2047; dispatch(); vInstruction(CON_ADDWEAPON):