mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-20 18:42:17 +00:00
- fixed disappearing inventory after morphing pickup
When player is picked up item that does morph, the corresponding toucher actor is changed in process Previously, morhing item was removed from original actor leaving player's inventory in inconsistent state https://forum.zdoom.org/viewtopic.php?t=63124
This commit is contained in:
parent
53a1fb5705
commit
23a84994f5
1 changed files with 7 additions and 0 deletions
|
@ -509,6 +509,13 @@ class Inventory : Actor
|
|||
// The item is placed in the inventory just long enough to be used.
|
||||
toucher.AddInventory(self);
|
||||
bool usegood = Use(true);
|
||||
|
||||
// Handle potential change of toucher/owner because of morph
|
||||
if (usegood && self.owner)
|
||||
{
|
||||
toucher = self.owner;
|
||||
}
|
||||
|
||||
toucher.RemoveInventory(self);
|
||||
|
||||
if (usegood)
|
||||
|
|
Loading…
Reference in a new issue