Added GetSpawnHealth() and GetGibHealth() for DECORATE

This commit is contained in:
Randy Heit 2016-02-25 10:08:08 -06:00
parent a862f728b6
commit 7f57f68ce1
2 changed files with 36 additions and 0 deletions

View file

@ -323,6 +323,40 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, GetDistance)
return 0;
}
//==========================================================================
//
// GetSpawnHealth
//
//==========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, GetSpawnHealth)
{
if (numret > 0)
{
PARAM_PROLOGUE;
PARAM_OBJECT(self, AActor);
ret->SetInt(self->SpawnHealth());
return 1;
}
return 0;
}
//==========================================================================
//
// GetGibHealth
//
//==========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, GetGibHealth)
{
if (numret > 0)
{
PARAM_PROLOGUE;
PARAM_OBJECT(self, AActor);
ret->SetInt(self->GetGibHealth());
return 1;
}
return 0;
}
//===========================================================================
//
// __decorate_internal_state__

View file

@ -42,6 +42,8 @@ ACTOR Actor native //: Thinker
native bool IsPointerEqual(int ptr_select1, int ptr_select2);
native int CountInv(class<Inventory> itemtype, int ptr_select = AAPTR_DEFAULT);
native float GetDistance(bool checkz, int ptr = AAPTR_DEFAULT);
native int GetSpawnHealth();
native int GetGibHealth();
// Action functions
// Meh, MBF redundant functions. Only for DeHackEd support.