[Scummvm-git-logs] scummvm master -> f88c8e087b4217fcb975284497660704abe29c9d

OMGPizzaGuy noreply at scummvm.org
Thu Oct 12 22:48:17 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:
f88c8e087b ULTIMA8: Alter sweep test to mark touching floor when at end of Z movement.


Commit: f88c8e087b4217fcb975284497660704abe29c9d
    https://github.com/scummvm/scummvm/commit/f88c8e087b4217fcb975284497660704abe29c9d
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2023-10-12T17:47:33-05:00

Commit Message:
ULTIMA8: Alter sweep test to mark touching floor when at end of Z movement.
This fixes walking on water nears the docks

Changed paths:
    engines/ultima/ultima8/world/current_map.cpp
    engines/ultima/ultima8/world/gravity_process.cpp


diff --git a/engines/ultima/ultima8/world/current_map.cpp b/engines/ultima/ultima8/world/current_map.cpp
index 27d0b85930e..6491c499320 100644
--- a/engines/ultima/ultima8/world/current_map.cpp
+++ b/engines/ultima/ultima8/world/current_map.cpp
@@ -1125,8 +1125,11 @@ bool CurrentMap::sweepTest(const int32 start[3], const int32 end[3],
 						        (i == 2 && ext[i] == 0 && oext[i] == 0 &&
 						         oext[0] == 64 && oext[1] == 64))
 							touch = true; // touch at start
-						if (A_min + vel[i] == B_max)
+						if (A_min + vel[i] == B_max) {
 							touch = true; // touch at end
+							if (i == 2)
+								touch_floor = true;
+						}
 
 						// - want to know when rear of A passes front of B
 						u_0[i] = ((B_max - A_min) * 0x4000) / vel[i];
diff --git a/engines/ultima/ultima8/world/gravity_process.cpp b/engines/ultima/ultima8/world/gravity_process.cpp
index ab5bbc0c675..68584d77c54 100644
--- a/engines/ultima/ultima8/world/gravity_process.cpp
+++ b/engines/ultima/ultima8/world/gravity_process.cpp
@@ -103,7 +103,8 @@ void GravityProcess::run() {
 
 	// Shouldn't go negative as original did not allow it
 	if (iz <= 0 && _zSpeed < 0) {
-		terminate();
+		terminateDeferred();
+		fallStopped();
 		return;
 	}
 




More information about the Scummvm-git-logs mailing list