From ceba4b0daefbc0e7c95a21bfada6109e9b6b828e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 8 Feb 2016 21:01:25 +0100 Subject: [PATCH] - 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. --- src/thingdef/olddecorations.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/thingdef/olddecorations.cpp b/src/thingdef/olddecorations.cpp index 541f3602c2..fa543e372a 100644 --- a/src/thingdef/olddecorations.cpp +++ b/src/thingdef/olddecorations.cpp @@ -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")) {