ULTIMA8: Ignore hurl for contained objects

The gravity process will break anyway because they have invalid coordinates.
This commit is contained in:
Matthew Duggan 2021-06-27 20:15:13 +09:00
parent 17c58095db
commit f18b95b2c7

View File

@ -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();