[Fixed] not possible to exit after the player dies?

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

not possible to exit after the player dies?

Post by Cyb »

short of fragging a romero head, if the player's dead body crosses a exit line or a death script specifys to exit the map (exit_normal at least) then nothing happens. I dunno if this was intentional or not, but original doom's behavior was to let the player exit, and I don't see any problems that could arise from this with the exception of hubs (and even then if the player crosses into another map in the hub he'll still be dead, but in a different map from where he died)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

This is intentional.

Here's the code that does the checks if you are interested:

Code: Select all

// [RH] Check dmflags for noexit and respond accordingly
bool CheckIfExitIsGood (AActor *self)
{
	// The world can always exit itself.
	if (self == NULL)
		return true;

	if (self->player && self->player->playerstate == PST_DEAD)
	{
		return false;
	}
	if ((deathmatch || alwaysapplydmflags) && (dmflags & DF_NO_EXIT))
	{
		P_DamageMobj (self, self, self, 10000, MOD_EXIT);
		return false;
	}
	if (deathmatch)
	{
		Printf ("%s exited the level.\n", self->player->userinfo.netname);
	}
	return true;
}

This behavior was introduced in Boom.
A compatibility option would certainly be nice because there are a few WADs out there that exploit Doom's behavior.
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

Hm, in Mock2 we were going to have a script that exited the level with DEATH script... does this mean it won't work?
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Yeah, that code above will probably prevent it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Nanami wrote:Hm, in Mock2 we were going to have a script that exited the level with DEATH script... does this mean it won't work?
Probably not. I didn't test it but the dead player is the activator of the death script and I can't find any code that handles level exiting by script differently.
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Wait a minute... how does the kill player+exit level sector special work now?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

It uses a different means to exit the level. This only applies to the exit line specials.
Plus, the player isn't dead when the sector special executes, he's just almost dead.


Ok, I looked closer at the death script execution code. It appears to be executed before the player is marked dead so exiting in it should work.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

Graf Zahl wrote:he's just almost dead.
you see, there is a big difference between "mostly dead" and "all dead" :)
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Chilvence wrote:Wait a minute... how does the kill player+exit level sector special work now?
You mean the one at the end of E1M8? It doesn't kill the player. As soon as the player's health gets to 10% or under then the level exits. The player is still alive (or almost dead as has been said) :).
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

Oh, I see. So we see the player's dead, and then it exits the level... and then we all see he's not really dead, and he's getting better. ;)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

The E1M8 sector special exits the level when the player's health goes below 10 but it does not allow the player to be killed.
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Nanami wrote:Oh, I see. So we see the player's dead, and then it exits the level... and then we all see he's not really dead, and he's getting better. ;)
I used the special on a level where you are set up by enemy forces and ambushed. You wake up on the next level in prison with whatever health you finished the previous level on. This has been as low as 1% quite a few times, but I have never been killed by the special. I didn't realise you were actually prevented from dying though. Thanks for that info Graf.

Of course, in E1M8, I've always figured that final dark room is supposed to represent the bloody fight you port straight into when you arrive on Deimos. I've never considered it to indicate you getting killed as soon as you arrive.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Enjay wrote:
Nanami wrote:Oh, I see. So we see the player's dead, and then it exits the level... and then we all see he's not really dead, and he's getting better. ;)
I used the special on a level where you are set up by enemy forces and ambushed. You wake up on the next level in prison with whatever health you finished the previous level on. This has been as low as 1% quite a few times, but I have never been killed by the special. I didn't realise you were actually prevented from dying though. Thanks for that info Graf.

Of course, in E1M8, I've always figured that final dark room is supposed to represent the bloody fight you port straight into when you arrive on Deimos. I've never considered it to indicate you getting killed as soon as you arrive.
If it did, the next two episodes would be REALLY short.
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

HotWax wrote:If it did, the next two episodes would be REALLY short.
My thoughts exactly. :)
User avatar
randi
Site Admin
Posts: 7746
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

Removed the dead player check.
Post Reply

Return to “Closed Bugs [GZDoom]”