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

OMGPizzaGuy 48367439+OMGPizzaGuy at users.noreply.github.com
Mon May 3 01:01:14 UTC 2021


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:
e0c1ea0584 ULTIMA8: Update SortItem ListLessThan function to be more consistent


Commit: e0c1ea05843037b86293648bf902198a04dec089
    https://github.com/scummvm/scummvm/commit/e0c1ea05843037b86293648bf902198a04dec089
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2021-05-02T19:59:31-05:00

Commit Message:
ULTIMA8: Update SortItem ListLessThan function to be more consistent

If flats can be less than other flats at the same Z coord, then the result would be reliant on with item is this vs other. Making the check flat vs non-flat adds consistency.

Changed paths:
    engines/ultima/ultima8/world/item_sorter.cpp


diff --git a/engines/ultima/ultima8/world/item_sorter.cpp b/engines/ultima/ultima8/world/item_sorter.cpp
index 9995642ab6..f7aedeb2f1 100644
--- a/engines/ultima/ultima8/world/item_sorter.cpp
+++ b/engines/ultima/ultima8/world/item_sorter.cpp
@@ -235,7 +235,7 @@ struct SortItem {
 
 	// Comparison for the sorted lists
 	inline bool ListLessThan(const SortItem *other) const {
-		return _z < other->_z || (_z == other->_z && _flat);
+			return _z < other->_z || (_z == other->_z && _flat && !other->_flat);
 	}
 
 };




More information about the Scummvm-git-logs mailing list