- moved the 'brainexplode' state to the rocket, which is the actor which actually uses it.

This appears to be the only case where an actor was set to a state owned by a completely unrelated actor which would present some problems with state owner checking in AActor::SetState, so let's better get rid of it ASAP.
I believe the only reason this wasn't changed when all actors were exported 8 years ago was that old binary DEHSUPP lump.
This commit is contained in:
Christoph Oelckers 2016-11-14 15:02:44 +01:00
parent ac86a535e7
commit 56a3dcfe80
5 changed files with 10 additions and 7 deletions

View file

@ -209,7 +209,6 @@ xx(XDeath)
xx(Burn)
//xx(Ice) // already defined above
xx(Disintegrate)
xx(Brainexplode)
// Weapon animator names.
xx(Select)

View file

@ -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;
}

View file

@ -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

View file

@ -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);

View file

@ -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;
}
}