Stop leaking function damage expressions.
- Function damage expressions parsed from DECORATE are now stored in a single array and deleted at the end of FinishThingdef().
This commit is contained in:
parent
e3e32d7cca
commit
070c0a9e30
3 changed files with 16 additions and 2 deletions
|
|
@ -544,7 +544,14 @@ DEFINE_PROPERTY(damage, X, Actor)
|
|||
|
||||
// Store this expression here for now. It will be converted to a function
|
||||
// later once all actors have been processed.
|
||||
defaults->Damage = (VMFunction *)id;
|
||||
if (id == NULL)
|
||||
{
|
||||
defaults->Damage = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
defaults->Damage = (VMFunction *)(uintptr_t)(ActorDamageFuncs.Push(id) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue