- added a GetMissileDamage function to DECORATE which can be used to properly retrieve an actor's damage value.
The damage property should be considered deprecated inside expressions from now on.
This commit is contained in:
parent
f1ba19073f
commit
3eb1af6957
2 changed files with 33 additions and 0 deletions
|
|
@ -231,6 +231,38 @@ DEFINE_ACTION_FUNCTION(AActor, CheckClass)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CheckClass
|
||||
//
|
||||
// NON-ACTION function to calculate missile damage for the given actor
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, GetMissileDamage)
|
||||
{
|
||||
if (numret > 0)
|
||||
{
|
||||
assert(ret != NULL);
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_INT(mask);
|
||||
PARAM_INT(add)
|
||||
PARAM_INT_OPT(pick_pointer) { pick_pointer = AAPTR_DEFAULT; }
|
||||
|
||||
self = COPY_AAPTR(self, pick_pointer);
|
||||
if (self == NULL)
|
||||
{
|
||||
ret->SetInt(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret->SetInt(self->GetMissileDamage(mask, add));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// IsPointerEqual
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue