[Scummvm-git-logs] scummvm master -> ade8ebd0973b1a82071ef0818e6a8ed79b476bb7

AndywinXp noreply at scummvm.org
Mon Oct 17 19:24:52 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ade8ebd097 SCUMM: INDY4: Replace old actor workaround with proper fix


Commit: ade8ebd0973b1a82071ef0818e6a8ed79b476bb7
    https://github.com/scummvm/scummvm/commit/ade8ebd0973b1a82071ef0818e6a8ed79b476bb7
Author: AndywinXp (andywinxp at gmail.com)
Date: 2022-10-17T21:24:41+02:00

Commit Message:
SCUMM: INDY4: Replace old actor workaround with proper fix

Changed paths:
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 5a0ef0eadc7..01b8d45e165 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -3178,21 +3178,19 @@ void ScummEngine_v5::o5_walkActorToActor() {
 	int nr2 = getVarOrDirectByte(PARAM_2);
 	int dist = fetchScriptByte();
 
-	if (_game.id == GID_INDY4 && nr == 1 && nr2 == 106 &&
-		dist == 255 && vm.slot[_currentScript].number == 210) {
-		// WORKAROUND bug: Work around an invalid actor bug when using the
-		// camel in Fate of Atlantis, the "wits" path. The room-65-210 script
-		// contains this:
-		//   walkActorToActor(1,106,255)
-		// Once again this is either a script bug, or there is some hidden
-		// or unknown meaning to this odd walk request...
+	// We put a guard here, in case the scripts end up giving us
+	// an invalid actor id (and FOA does that quite a lot)...
+	if (!isValidActor(nr))
 		return;
-	}
 
 	a = derefActor(nr, "o5_walkActorToActor");
 	if (!a->isInCurrentRoom())
 		return;
 
+	// Same as before...
+	if (!isValidActor(nr2))
+		return;
+
 	a2 = derefActor(nr2, "o5_walkActorToActor(2)");
 	if (!a2->isInCurrentRoom())
 		return;




More information about the Scummvm-git-logs mailing list