mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Fix RemoveInventory not calling DetachFromOwner when an item is the first in the owner's inventory.
Fix CheckAddToSlots not working because it uses GetReplacement incorrectly.
This commit is contained in:
parent
53291b0abf
commit
d6d3dd038e
2 changed files with 2 additions and 2 deletions
|
@ -122,11 +122,11 @@ extend class Actor
|
|||
if (invp.Inv == item)
|
||||
{
|
||||
invp.Inv = item.Inv;
|
||||
item.DetachFromOwner();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
item.DetachFromOwner();
|
||||
item.Owner = NULL;
|
||||
item.Inv = NULL;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ class Weapon : StateProvider
|
|||
|
||||
virtual int, int CheckAddToSlots()
|
||||
{
|
||||
if (GetReplacement(GetClass()) == null && !bPowered_Up)
|
||||
if (GetReplacement(GetClass()) == GetClass() && !bPowered_Up)
|
||||
{
|
||||
return SlotNumber, SlotPriority*65536;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue