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:
Randy Heit 2013-07-25 21:42:30 -05:00
commit 070c0a9e30
3 changed files with 16 additions and 2 deletions

View file

@ -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);
}
}
//==========================================================================