From f18b95b2c7850ccedf74a4ea801456d8f57224a5 Mon Sep 17 00:00:00 2001 From: Matthew Duggan Date: Sun, 27 Jun 2021 20:15:13 +0900 Subject: [PATCH] ULTIMA8: Ignore hurl for contained objects The gravity process will break anyway because they have invalid coordinates. --- engines/ultima/ultima8/world/item.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engines/ultima/ultima8/world/item.cpp b/engines/ultima/ultima8/world/item.cpp index 03ef6430df8..868c38671d9 100644 --- a/engines/ultima/ultima8/world/item.cpp +++ b/engines/ultima/ultima8/world/item.cpp @@ -2098,6 +2098,12 @@ void Item::grab() { void Item::hurl(int xs, int ys, int zs, int grav) { + if (_parent) { + // Should be removed from the container first?? + // This will break otherwise as location is 0,0,0 + warning("Ignoring hurl for contained item %d.", _objId); + return; + } // crusader sleeps existing gravity at first bool do_sleep = GAME_IS_CRUSADER && (_gravityPid == 0); GravityProcess *p = ensureGravityProcess();