[Scummvm-git-logs] scummvm master -> f39fedd06e4eb2e6dce0e3e5f2683457a4bd5eb3
OMGPizzaGuy
48367439+OMGPizzaGuy at users.noreply.github.com
Thu Aug 6 04:11:35 UTC 2020
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:
f39fedd06e ULTIMA8: Update pathfinder to account for 16 directions for node cost calculation
Commit: f39fedd06e4eb2e6dce0e3e5f2683457a4bd5eb3
https://github.com/scummvm/scummvm/commit/f39fedd06e4eb2e6dce0e3e5f2683457a4bd5eb3
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2020-08-05T23:11:17-05:00
Commit Message:
ULTIMA8: Update pathfinder to account for 16 directions for node cost calculation
Changed paths:
engines/ultima/ultima8/world/actors/pathfinder.cpp
diff --git a/engines/ultima/ultima8/world/actors/pathfinder.cpp b/engines/ultima/ultima8/world/actors/pathfinder.cpp
index bc3a273d03..dd1f8dd7de 100644
--- a/engines/ultima/ultima8/world/actors/pathfinder.cpp
+++ b/engines/ultima/ultima8/world/actors/pathfinder.cpp
@@ -382,7 +382,7 @@ void Pathfinder::newNode(PathNode *oldnode, PathfindingState &state,
if (oldnode->depth > 0) {
turn = state._direction - oldnode->state._direction;
if (turn < 0) turn = -turn;
- if (turn > 4) turn = 8 - turn;
+ if (turn > 8) turn = 16 - turn;
}
newnode->cost = oldnode->cost + dist + 32 * turn; //!! constant
More information about the Scummvm-git-logs
mailing list