- fixed: old style DECORATE must use exactly the same method to store the damage function as the modern version.

The difference in handling crashed with Daedalus.
This commit is contained in:
Christoph Oelckers 2016-02-08 21:01:25 +01:00
parent c940c2ba81
commit ceba4b0dae

View file

@ -48,6 +48,7 @@
#include "decallib.h"
#include "i_system.h"
#include "thingdef.h"
#include "thingdef_exp.h"
#include "r_data/r_translate.h"
// TYPES -------------------------------------------------------------------
@ -495,7 +496,8 @@ static void ParseInsideDecoration (Baggage &bag, AActor *defaults,
else if (def == DEF_Projectile && sc.Compare ("Damage"))
{
sc.MustGetNumber ();
defaults->Damage = CreateDamageFunction(sc.Number);
FxDamageValue *x = new FxDamageValue(new FxConstant(sc.Number, sc), false);
defaults->Damage = (VMFunction *)(uintptr_t)(ActorDamageFuncs.Push(x) + 1);
}
else if (def == DEF_Projectile && sc.Compare ("DamageType"))
{