[Scummvm-git-logs] scummvm master -> 2065fd9d0b3d0573023e5274b249b672a1fb2c3b
aquadran
noreply at scummvm.org
Thu Jan 6 15:23:20 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:
2065fd9d0b EMI: Improve check for followed walkboxes for Actor.
Commit: 2065fd9d0b3d0573023e5274b249b672a1fb2c3b
https://github.com/scummvm/scummvm/commit/2065fd9d0b3d0573023e5274b249b672a1fb2c3b
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2022-01-06T16:23:13+01:00
Commit Message:
EMI: Improve check for followed walkboxes for Actor.
This eliminate return nil by GetActorPuckVector() when it shouldn't.
Script Lua function "find_stair_chore" is not expecting nil and will throw error.
Changed paths:
engines/grim/actor.h
engines/grim/emi/lua_v2_actor.cpp
diff --git a/engines/grim/actor.h b/engines/grim/actor.h
index 4ad380f69c3..5795e53cc0c 100644
--- a/engines/grim/actor.h
+++ b/engines/grim/actor.h
@@ -493,6 +493,7 @@ public:
void setActivateShadow(int, bool);
void setFollowBoxes(bool follow);
+ bool hasFollowBoxes() const { return _followBoxes; }
bool hasFollowedBoxes() const { return _hasFollowedBoxes; }
void update(uint frameTime);
/**
diff --git a/engines/grim/emi/lua_v2_actor.cpp b/engines/grim/emi/lua_v2_actor.cpp
index 45f23c92b85..b5cb3c77906 100644
--- a/engines/grim/emi/lua_v2_actor.cpp
+++ b/engines/grim/emi/lua_v2_actor.cpp
@@ -873,7 +873,7 @@ void Lua_V2::GetActorPuckVector() {
// Note: The wear chore of dumbshadow.cos is only started from Lua if
// GetActorPuckVector returns a non-nil value. The original engine seems
// to return nil for all actors that have never followed walkboxes.
- if (!actor || !actor->hasFollowedBoxes()) {
+ if (!actor || (!actor->hasFollowedBoxes() && !actor->hasFollowBoxes())) {
lua_pushnil();
return;
}
More information about the Scummvm-git-logs
mailing list