[Scummvm-git-logs] scummvm master -> 1782054d05388384501882a630dab6ce51748056

sev- noreply at scummvm.org
Sun May 14 20:56:47 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:
1782054d05 NUVIE: ULTIMA6: Fix sextant usage in gargoyle underworld


Commit: 1782054d05388384501882a630dab6ce51748056
    https://github.com/scummvm/scummvm/commit/1782054d05388384501882a630dab6ce51748056
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-05-14T22:56:43+02:00

Commit Message:
NUVIE: ULTIMA6: Fix sextant usage in gargoyle underworld

Make sextants usable in the gargoyle underworld and adjust
coordinate calculation accordingly.

Fixes #14408

Changed paths:
    engines/ultima/nuvie/usecode/u6_usecode.cpp


diff --git a/engines/ultima/nuvie/usecode/u6_usecode.cpp b/engines/ultima/nuvie/usecode/u6_usecode.cpp
index bf3dbdcf04f..6d3b38a632f 100644
--- a/engines/ultima/nuvie/usecode/u6_usecode.cpp
+++ b/engines/ultima/nuvie/usecode/u6_usecode.cpp
@@ -2328,9 +2328,9 @@ bool U6UseCode::use_sextant(Obj *obj, UseCodeEvent ev) {
 
 	location = player->get_actor()->get_location();
 
-//only use sextant on surface level.
-	if (location.z == 0) {
-		x = location.x / 8;
+//only use sextant on surface level or in the gargoyle underworld.
+	if (location.z == 0 || location.z == 5) {
+		x = location.x / (location.z ? 2 : 8);
 		if (x > 38) {
 			lon = 'E';
 			x -= 38;
@@ -2339,7 +2339,7 @@ bool U6UseCode::use_sextant(Obj *obj, UseCodeEvent ev) {
 			lon = 'W';
 		}
 
-		y = location.y / 8;
+		y = location.y / (location.z ? 2 : 8);
 		if (y > 45) {
 			lat = 'S';
 			y -= 45;




More information about the Scummvm-git-logs mailing list