[Scummvm-git-logs] scummvm master -> 548c6e019dc145a230c505460e97be384c1ee533

OMGPizzaGuy noreply at scummvm.org
Sat May 18 01:37:25 UTC 2024


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:
548c6e019d ULTIMA8: Update fast area during item create from usecode.


Commit: 548c6e019dc145a230c505460e97be384c1ee533
    https://github.com/scummvm/scummvm/commit/548c6e019dc145a230c505460e97be384c1ee533
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2024-05-17T20:34:16-05:00

Commit Message:
ULTIMA8: Update fast area during item create from usecode.
Fixes invalid placement of barrel #14839

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


diff --git a/engines/ultima/ultima8/world/item.cpp b/engines/ultima/ultima8/world/item.cpp
index df242141c5a..806fff12ad6 100644
--- a/engines/ultima/ultima8/world/item.cpp
+++ b/engines/ultima/ultima8/world/item.cpp
@@ -3185,8 +3185,14 @@ uint32 Item::I_legalCreateAtPoint(const uint8 *args, unsigned int /*argsize*/) {
 
 	World_FromUsecodeXY(x, y);
 
-	// check if item can exist
+	const ShapeInfo *si = GameData::get_instance()->getMainShapes()->getShapeInfo(shape);
+	int32 xd, yd, zd;
+	si->getFootpadWorld(xd, yd, zd, 0);
+
 	CurrentMap *cm = World::get_instance()->getCurrentMap();
+	cm->updateFastArea(x, y, z, x - xd, y - yd, z + zd);
+
+	// check if item can exist
 	PositionInfo info = cm->getPositionInfo(x, y, z, shape, 0);
 	if (!info.valid)
 		return 0;
@@ -3217,8 +3223,14 @@ uint32 Item::I_legalCreateAtCoords(const uint8 *args, unsigned int /*argsize*/)
 
 	World_FromUsecodeXY(x, y);
 
-	// check if item can exist
+	const ShapeInfo *si = GameData::get_instance()->getMainShapes()->getShapeInfo(shape);
+	int32 xd, yd, zd;
+	si->getFootpadWorld(xd, yd, zd, 0);
+
 	CurrentMap *cm = World::get_instance()->getCurrentMap();
+	cm->updateFastArea(x, y, z, x - xd, y - yd, z + zd);
+
+	// check if item can exist
 	PositionInfo info = cm->getPositionInfo(x, y, z, shape, 0);
 	if (!info.valid)
 		return 0;




More information about the Scummvm-git-logs mailing list