Revert "- fix some issues with ClearInventory() that sometimes caused script errors"

This reverts commit 41c69736b1.

This introduced more bugs and so the fix was not valid.
This commit is contained in:
Rachael Alexanderson 2024-09-30 03:27:39 -04:00
parent 8e1b25803e
commit 18c068fd1f
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0
2 changed files with 6 additions and 7 deletions

View file

@ -940,7 +940,6 @@ class Inventory : Actor
}
else
{
Owner = null;
Destroy();
}
}

View file

@ -333,13 +333,8 @@ extend class Actor
// destroy something we already processed, we've already destroyed it,
// so it won't have anything to destroy.
if (player != null)
{
player.ReadyWeapon = null;
player.PendingWeapon = WP_NOCHANGE;
}
let last = self;
while (last.inv != NULL)
{
let inv = last.inv;
@ -353,6 +348,11 @@ extend class Actor
last = inv;
}
}
if (player != null)
{
player.ReadyWeapon = null;
player.PendingWeapon = WP_NOCHANGE;
}
}