From 405b8cc2303fd45f9ce9247034d81bc787faa929 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 21 Jun 2021 22:43:50 +0200 Subject: [PATCH] SAGA2: Fix bugs in the original with the combat action in the savegame --- engines/saga2/motion.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/saga2/motion.cpp b/engines/saga2/motion.cpp index 4134f3e6c25..73a4625128f 100644 --- a/engines/saga2/motion.cpp +++ b/engines/saga2/motion.cpp @@ -772,7 +772,7 @@ void *MotionTask::restore(void *buf) { actionCounter = *((int16 *)buf); buf = (int16 *)buf + 1; - if (motionType = motionTypeOneHandedParry) { + if (motionType == motionTypeOneHandedParry) { // Restore the combat sub-motion type combatMotionType = *((uint8 *)buf); buf = (uint8 *)buf + 1; @@ -911,7 +911,7 @@ int32 MotionTask::archiveSize(void) { + sizeof(d.defenseFlags) + sizeof(actionCounter); - if (motionType = motionTypeOneHandedParry) + if (motionType == motionTypeOneHandedParry) size += sizeof(combatMotionType); } else if (motionType == motionTypeDodge || motionType == motionTypeAcceptHit @@ -1170,7 +1170,7 @@ void *MotionTask::archive(void *buf) { *((int16 *)buf) = actionCounter; buf = (int16 *)buf + 1; - if (motionType = motionTypeOneHandedParry) { + if (motionType == motionTypeOneHandedParry) { // Store the combat sub-motion type *((uint8 *)buf) = combatMotionType; buf = (uint8 *)buf + 1;