[Scummvm-git-logs] scummvm master -> d65f6f4c923af83bc4562396c5dfa9097616d772
AndywinXp
noreply at scummvm.org
Mon Oct 17 20:28:58 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:
d65f6f4c92 SCUMM: SAMNMAX: Remove never triggered workaround
Commit: d65f6f4c923af83bc4562396c5dfa9097616d772
https://github.com/scummvm/scummvm/commit/d65f6f4c923af83bc4562396c5dfa9097616d772
Author: AndywinXp (andywinxp at gmail.com)
Date: 2022-10-17T22:28:48+02:00
Commit Message:
SCUMM: SAMNMAX: Remove never triggered workaround
This workaround was originally meant to address the case in which derefActor was called with
an id == 0. Originally, a value of 0 triggered a range error. As a matter of fact, we (correctly) accept
actors id == 0 now, so this workaround is never being triggered.
Changed paths:
engines/scumm/script_v6.cpp
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index e2080fa5f74..a2222bd36bb 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -1125,13 +1125,11 @@ void ScummEngine_v6::o6_walkActorToObj() {
getObjectXYPos(obj, x, y, dir);
a->startWalkActor(x, y, dir);
} else {
- a2 = derefActorSafe(obj, "o6_walkActorToObj(2)");
- if (_game.id == GID_SAMNMAX && a2 == nullptr) {
- // WORKAROUND bug #801 SAM: Fish Farm. Note quite sure why it
- // happens, whether it's normal or due to a bug in the ScummVM code.
- debug(0, "o6_walkActorToObj: invalid actor %d", obj);
+ if (!isValidActor(obj))
return;
- }
+
+ a2 = derefActor(obj, "o6_walkActorToObj(2)");
+
if (!a->isInCurrentRoom() || !a2->isInCurrentRoom())
return;
if (dist == 0) {
More information about the Scummvm-git-logs
mailing list