[Scummvm-git-logs] scummvm master -> 9a66d1ac92ed227c6c0ce45d97f5dc4862820eaf

OMGPizzaGuy noreply at scummvm.org
Fri Oct 13 02:21:03 UTC 2023


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:
9a66d1ac92 ULTIMA8: Ignore end off land handling if starting off land in movement process.


Commit: 9a66d1ac92ed227c6c0ce45d97f5dc4862820eaf
    https://github.com/scummvm/scummvm/commit/9a66d1ac92ed227c6c0ce45d97f5dc4862820eaf
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2023-10-12T21:20:40-05:00

Commit Message:
ULTIMA8: Ignore end off land handling if starting off land in movement process.
This unrestricts movement when player is out of bounds.

Changed paths:
    engines/ultima/ultima8/world/actors/u8_avatar_mover_process.cpp


diff --git a/engines/ultima/ultima8/world/actors/u8_avatar_mover_process.cpp b/engines/ultima/ultima8/world/actors/u8_avatar_mover_process.cpp
index 5beb7e097e4..3e96a13eb8c 100644
--- a/engines/ultima/ultima8/world/actors/u8_avatar_mover_process.cpp
+++ b/engines/ultima/ultima8/world/actors/u8_avatar_mover_process.cpp
@@ -640,6 +640,14 @@ void U8AvatarMoverProcess::step(Animation::Sequence action, Direction direction,
 	Animation::Result res = avatar->tryAnim(action, direction);
 	Direction stepdir = direction;
 
+	// Ignore end off land if starting off land
+	if (res == Animation::END_OFF_LAND) {
+		int32 ax, ay, az;
+		avatar->getLocation(ax, ay, az);
+		if (!avatar->canExistAt(ax, ay, az, true))
+			res = Animation::SUCCESS;
+	}
+
 	if (res == Animation::FAILURE ||
 	        (action == Animation::step && res == Animation::END_OFF_LAND)) {
 		debug(6, "Step: end off land dir %d, try other dir", stepdir);




More information about the Scummvm-git-logs mailing list