[Scummvm-git-logs] scummvm master -> 0f4df1fe55b684a44af10065642bd8bcb5044dbb
OMGPizzaGuy
noreply at scummvm.org
Fri May 24 22:21:57 UTC 2024
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:
0f4df1fe55 ULTIMA8: Trace coordinates on middle-click pathfinding.
Commit: 0f4df1fe55b684a44af10065642bd8bcb5044dbb
https://github.com/scummvm/scummvm/commit/0f4df1fe55b684a44af10065642bd8bcb5044dbb
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2024-05-24T17:21:39-05:00
Commit Message:
ULTIMA8: Trace coordinates on middle-click pathfinding.
Previously this used the traced item location, which would not lead to the expected location. Fixes #13851
Changed paths:
engines/ultima/ultima8/gumps/game_map_gump.cpp
diff --git a/engines/ultima/ultima8/gumps/game_map_gump.cpp b/engines/ultima/ultima8/gumps/game_map_gump.cpp
index a2e7a5f5bec..e8a3b1ce400 100644
--- a/engines/ultima/ultima8/gumps/game_map_gump.cpp
+++ b/engines/ultima/ultima8/gumps/game_map_gump.cpp
@@ -322,18 +322,19 @@ void GameMapGump::onMouseClick(int button, int32 mx, int32 my) {
break;
}
case Mouse::BUTTON_MIDDLE: {
- uint16 objID = TraceObjId(mx, my);
+ ParentToGump(mx, my);
+
+ int32 coords[3];
+ uint16 objID = TraceCoordinates(mx, my, coords);
Item *item = getItem(objID);
if (item) {
- int32 xv, yv, zv;
- item->getLocation(xv, yv, zv);
debugC(kDebugObject, "%s", item->dumpInfo().c_str());
if (Ultima8Engine::get_instance()->isAvatarInStasis()) {
debugC(kDebugObject, "Can't move: avatarInStasis");
} else {
Actor *avatarControlled = getControlledActor();
- PathfinderProcess *pfp = new PathfinderProcess(avatarControlled, xv, yv, zv);
+ PathfinderProcess *pfp = new PathfinderProcess(avatarControlled, coords[0], coords[1], coords[2]);
Kernel::get_instance()->addProcess(pfp);
}
}
More information about the Scummvm-git-logs
mailing list