- moved AInventory::DoRespawn fully to the script side.
This commit is contained in:
parent
3922f817fb
commit
bc1990b6d7
5 changed files with 31 additions and 32 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue