diff --git a/src/namedef.h b/src/namedef.h index ee7d08f407..f8475f7169 100644 --- a/src/namedef.h +++ b/src/namedef.h @@ -209,7 +209,6 @@ xx(XDeath) xx(Burn) //xx(Ice) // already defined above xx(Disintegrate) -xx(Brainexplode) // Weapon animator names. xx(Select) diff --git a/src/scripting/decorate/thingdef_exp.cpp b/src/scripting/decorate/thingdef_exp.cpp index 7e4c3b3987..229c8f1f48 100644 --- a/src/scripting/decorate/thingdef_exp.cpp +++ b/src/scripting/decorate/thingdef_exp.cpp @@ -476,6 +476,10 @@ static FxExpression *ParseExpression0 (FScanner &sc, PClassActor *cls) { exp = new FxRuntimeStateIndex(ParseExpressionM(sc, cls)); } + // The parsed expression is of type 'statelabel', but we want a real state here so we must convert it. + FArgumentList args; + args.Push(exp); + exp = new FxFunctionCall(NAME_ResolveState, NAME_None, args, sc); sc.MustGetToken(')'); return exp; } diff --git a/wadsrc/static/dehsupp.txt b/wadsrc/static/dehsupp.txt index 78948677f4..436e894b48 100644 --- a/wadsrc/static/dehsupp.txt +++ b/wadsrc/static/dehsupp.txt @@ -327,7 +327,7 @@ StateMap BossEye, Spawn, 3, // S_BRAINEYE - S_BRAINEYE1 SpawnShot, Spawn, 4, // S_SPAWN1 - S_SPAWN4 SpawnFire, Spawn, 8, // S_SPAWNFIRE1 - S_SPAWNFIRE8 - BossBrain, BrainExplode, 3, // S_BRAINEXPLODE1 - S_BRAINEXPLODE3 + Rocket, BrainExplode, 3, // S_BRAINEXPLODE1 - S_BRAINEXPLODE3 GreenArmor, Spawn, 2, // S_ARM1 - S_ARM1A BlueArmor, Spawn, 2, // S_ARM2 - S_ARM2A ExplosiveBarrel, Spawn, 7, // S_BAR1 - S_BEXP5 diff --git a/wadsrc/static/zscript/doom/bossbrain.txt b/wadsrc/static/zscript/doom/bossbrain.txt index f097e2c3b3..6a72de2bfb 100644 --- a/wadsrc/static/zscript/doom/bossbrain.txt +++ b/wadsrc/static/zscript/doom/bossbrain.txt @@ -20,10 +20,6 @@ class BossBrain : Actor } States { - BrainExplode: - MISL BC 10 Bright; - MISL D 10 A_BrainExplode; - Stop; Spawn: BBRN A -1; Stop; @@ -162,7 +158,7 @@ extend class Actor boom.DeathSound = "misc/brainexplode"; boom.Vel.z = random[BrainScream](0, 255)/128.; - boom.SetStateLabel ("BossBrain::Brainexplode"); + boom.SetStateLabel ("Brainexplode"); boom.bRocketTrail = false; boom.SetDamage(0); // disables collision detection which is not wanted here boom.tics -= random[BrainScream](0, 7); diff --git a/wadsrc/static/zscript/doom/doomweapons.txt b/wadsrc/static/zscript/doom/doomweapons.txt index 41f2c434fa..a6eecd1891 100644 --- a/wadsrc/static/zscript/doom/doomweapons.txt +++ b/wadsrc/static/zscript/doom/doomweapons.txt @@ -357,6 +357,10 @@ class Rocket : Actor MISL C 6 Bright; MISL D 4 Bright; Stop; + BrainExplode: + MISL BC 10 Bright; + MISL D 10 A_BrainExplode; + Stop; } }