[2.1.1 32b] Crash : Attempted to spawn a monster when the player dies

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
Numnzel
Posts: 1
Joined: Wed Jul 06, 2016 13:59

[2.1.1 32b] Crash : Attempted to spawn a monster when the player dies

Post by Numnzel »

Hello all.

Trying to spawn a monster using A_SpawnItemEx on a custom death state of the player class causes gzdoom <2.1.1 32 bits> to crash every time.
But if I try to perform the same action in a DoomImp monster it does not happen, the monster spawns correctly.

Here is a copy of the decorate/maindefs lumps:

Code: Select all

actor NewCyberdemon : Cyberdemon replaces Cyberdemon {
	
	States {
	Missile:
		CYBR E 6 A_FaceTarget
		CYBR F 12 A_CustomMissile("FrostMissile2")
		Goto See
	}
}

actor FrostMissile2 : FrostMissile replaces FrostMissile {

	Damage 50
	DeathType Resurrect
	
	States {
	Spawn:
		SHRD A 2 Bright
		SHRD ABC 3 Bright
		Loop
	Death:
		SHEX ABCDE 5 Bright
		Stop
	}
}

actor NewDoomPlayer : DoomPlayer {
	
	States {
	Death.Resurrect:
		PLAY H 10
		PLAY I 10 A_PlayerScream
		PLAY J 10 A_NoBlocking
		PLAY KLMN 10
		TNT1 A 0 A_SpawnItemEx("MarinePlasma2",0.0,0.0,0.0,0.0,0.0,0.0,0,SXF_TRANSFERTRANSLATION|SXF_NOPOINTERS)
		Stop
	}
}

actor NewDoomImp : DoomImp replaces DoomImp {
	
	States {
	Death.Resurrect:
		PLAY H 10
		PLAY I 10 A_PlayerScream
		PLAY J 10 A_NoBlocking
		PLAY KLMN 10
		TNT1 A 0 A_SpawnItemEx("MarinePlasma2",0.0,0.0,0.0,0.0,0.0,0.0,0,SXF_TRANSFERTRANSLATION|SXF_NOPOINTERS)
		Stop
	}
}

actor MarinePlasma2 : MarinePlasma {
	
	States {
	Spawn:
		Goto Super::Raise
	}
}

// Decorate ends, Mapinfo starts...

gameinfo {

	playerclasses = "NewDoomPlayer"
}
Attachments
crashsummonmonster.wad
(11.57 KiB) Downloaded 38 times
CrashReport.zip
(18.1 KiB) Downloaded 41 times
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [2.1.1 32b] Crash : Attempted to spawn a monster when the player dies

Post by Graf Zahl »

You cannot terminate a player's death state with a 'stop'. If you absolutely want the player actor to disappear you need to add an empty state with an 'A_CheckPlayerGone' call that loops on itself.
If the player actor gets removed while still needed a crash is inevitable.

This is not fixable in the engine.
Locked

Return to “Closed Bugs”