mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-21 10:22:11 +00:00
Add Actor.HasReceived
This commit is contained in:
parent
a2a7667442
commit
19435293af
2 changed files with 7 additions and 0 deletions
|
@ -518,6 +518,11 @@ class Actor : Thinker native
|
|||
return true;
|
||||
}
|
||||
|
||||
// [AA] Called by inventory items at the end of CallTryPickup to let actors
|
||||
// do something with the items they've received. 'Item' might be null for
|
||||
// items that disappear on pickup.
|
||||
virtual void HasReceived(Inventory item) {}
|
||||
|
||||
// Called in TryMove if the mover ran into another Actor. This isn't called on players
|
||||
// if they're currently predicting. Guarantees collisions unlike CanCollideWith.
|
||||
virtual void CollidedWith(Actor other, bool passive) {}
|
||||
|
|
|
@ -645,6 +645,8 @@ class Inventory : Actor
|
|||
}
|
||||
}
|
||||
}
|
||||
// [AA] Let the toucher do something with the item they've just received:
|
||||
toucher.HasReceived(self);
|
||||
}
|
||||
return res, toucher;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue