mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- fixed: Trying to remove the first item in an actor's inventory would lose all owned items.
This commit is contained in:
parent
b47a3804d2
commit
d898cadda5
1 changed files with 1 additions and 3 deletions
|
@ -110,14 +110,12 @@ extend class Actor
|
||||||
|
|
||||||
virtual void RemoveInventory(Inventory item)
|
virtual void RemoveInventory(Inventory item)
|
||||||
{
|
{
|
||||||
Inventory invp;
|
|
||||||
|
|
||||||
if (item != NULL && item.Owner != NULL) // can happen if the owner was destroyed by some action from an item's use state.
|
if (item != NULL && item.Owner != NULL) // can happen if the owner was destroyed by some action from an item's use state.
|
||||||
{
|
{
|
||||||
if (Inv == item) Inv = item.Inv;
|
if (Inv == item) Inv = item.Inv;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (invp = Inv; invp != null; invp = invp.Inv)
|
for (Actor invp = self; invp != null; invp = invp.Inv)
|
||||||
{
|
{
|
||||||
if (invp.Inv == item)
|
if (invp.Inv == item)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue