- moved AInventory::DoRespawn fully to the script side.

This commit is contained in:
Christoph Oelckers 2018-11-30 00:20:06 +01:00
commit bc1990b6d7
5 changed files with 31 additions and 32 deletions

View file

@ -225,35 +225,6 @@ AInventory *AInventory::NextInv ()
return item;
}
//===========================================================================
//
// AInventory :: DoRespawn
//
//===========================================================================
bool AInventory::DoRespawn ()
{
if (SpawnPointClass != NULL)
{
AActor *spot = NULL;
DSpotState *state = DSpotState::GetSpotState();
if (state != NULL) spot = state->GetRandomSpot(SpawnPointClass);
if (spot != NULL)
{
SetOrigin (spot->Pos(), false);
SetZ(floorz);
}
}
return true;
}
DEFINE_ACTION_FUNCTION(AInventory, DoRespawn)
{
PARAM_SELF_PROLOGUE(AInventory);
ACTION_RETURN_BOOL(self->DoRespawn());
}
//===========================================================================
//
// AInventory :: CallTryPickup