- made CallTryPickup a global function.

This one still gets called in too many places but stands in the way of moving Inventory fully to the script side.
This commit is contained in:
Christoph Oelckers 2018-11-30 00:06:20 +01:00
commit 3922f817fb
6 changed files with 8 additions and 8 deletions

View file

@ -260,11 +260,11 @@ DEFINE_ACTION_FUNCTION(AInventory, DoRespawn)
//
//===========================================================================
bool AInventory::CallTryPickup(AActor *toucher, AActor **toucher_return)
bool CallTryPickup(AInventory *item, AActor *toucher, AActor **toucher_return)
{
static VMFunction *func = nullptr;
if (func == nullptr) PClass::FindFunction(&func, NAME_Inventory, NAME_CallTryPickup);
VMValue params[2] = { (DObject*)this, toucher };
VMValue params[2] = { (DObject*)item, toucher };
VMReturn ret[2];
int res;
AActor *tret;