[2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfloors

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
User avatar
Nightfall
Posts: 555
Joined: Thu Aug 06, 2009 4:00 am
Location: Finland

[2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfloors

Post by Nightfall »

From http://zandronum.com/tracker/view.php?id=2003, sv_samespawnspot doesn't respect 3d floors and you will respawn through them.

Steps to reproduce:
  • zdoom -file 3dfloor_respawn_test.wad +sv_samespawnspot 1 -host 1
  • Move into the 'hall' and suicide
  • You will respawn past the 3d floor in the hall into the water below.
Attachments
3dfloor_respawn_test.wad.zip
(851 Bytes) Downloaded 38 times
User avatar
Armaetus
Posts: 1256
Joined: Fri Mar 13, 2009 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10 Home
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: New York State
Contact:

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by Armaetus »

Sometimes you will respawn partially into the 3D floor or into architecture below it if any sectors used to give the "support pillar" design is used. Impossible to difficult to get out depending on where you spawn.
kevans91
Posts: 72
Joined: Tue Sep 16, 2014 11:25 am

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by kevans91 »

I believe this should be addressed: https://github.com/rheit/zdoom/pull/180

Previously, P_SpawnPlayer would set the z of the new PlayerPawn to ONCEILINGZ, FLOATRANDZ, or ONFLOORZ every time which would generally and completely disregard 3D floors.

I've changed this such that if they're able to respawn in place, they maintain the z they had previously. If they're having to respawn at a spawner, it takes on the previous behavior of ONCEILINGZ/FLOATRANDZ/ONFLOORZ with an adjustment to that for the spawner's z if UsePlayerStartZ is set.


What I'm not entirely sure about, and what I suppose might need correction, is whether MF_SPAWNCEILING and MF2_SPAWNFLOAT should still be respected in the case of SV_SAMESPAWNSPOT. I initially set it up to ignore these flags, because it seemed logical that if it were set to respawn in the same spot that players would expect to respawn in the exact same spot, rather than in that exact spot on the ceiling. I've not been able to find any documentation that explicitly draws out what this behavior should be, but I suspect my submission should be revised to respect these flags as it previously would have for the sake of not changing behavior people could (maybe?) be relying on.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by Graf Zahl »

I don't think there's much that can be done here. I've never seen players with these two flags and respecting them would break 3D floors just as the regular case.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by Edward-san »

This change lets me respawn in the mid air if you die while flying/jumping/etc. Is this okay?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by Gez »

I think it is. Then what happens, you fall on the ground because you don't respawn with the momentum you had when dying. And before the change, you'd respawn on the ground. Practical difference: not much.
kevans91
Posts: 72
Joined: Tue Sep 16, 2014 11:25 am

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by kevans91 »

For what it's worth, it seems like it would be a rather light change to check if the floor below the actor is a 3D floor, and either spawn on top of that surface or spawn at the absolute floor.

I'm rather torn on the issue, though. I might get irritated if I were a player that commit suicide/died pretty far up and then had to free-fall back down to a floor before continuing, but that same behavior could also provide a tactical advantage of a second or two foresight if you weren't sure of what was below you.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by Gez »

Meh. Same spot = same spot. If people don't want to resurrect in the same spot, they can turn sv_samespawnspot off.

I'm pretty sure if Doom were a full 3D game to begin with, the equivalent "resurrect in same spot" feature would be with all three coordinates, whether you die in a jump or not.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by NeuralStunner »

Sadly the option is pretty breakable even when it succeeds. Most deadly traps are the inescapable kind, simply because you're not intended to survive: Lava pit traps, Hexen-style death pits, crushers that don't reopen, etc.

I wonder if it would be acceptable to make an exception for damage caused by "the world", and do an at-start respawn. (Since the option seems to be designed for deaths by monsters.)
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by Gez »

If you're killed in the middle of a jump, it was by a monster (or another player), not by the world. If you're killed by an enemy while jumping above a death pit, it'll make you respawn above the death pit, fall, and die, and it wasn't a death by the world the first time.

Instead of trying to come up with an exception (besides, a trap that makes you telefrag barrels would be "death by actor", not "death by the world", same for being teleported at a HateTarget point surrounded by 128 cyberdemons scripted to fire at the spot constantly), something like a timer. If you die within, say, five seconds of respawning at the same spot, then your next respawn is at a regular player start. That'd be simpler and more robust I think. Make the time threshold a CVAR so that people can set it to shorter or longer according to their perfect idea of balance. Set it to 0 to disable it entirely and always respawn players where they died.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by NeuralStunner »

Gez wrote:If you're killed in the middle of a jump, it was by a monster (or another player), not by the world.
Unless you get, say, smashed by a fast-moving polyobject, or shot by a missile from a scripted trap, or just killed directly by script/special (rude!).
Gez wrote:If you're killed by an enemy while jumping above a death pit, it'll make you respawn above the death pit, fall, and die, and it wasn't a death by the world the first time.
Then no, it wasn't the trap causing it, how would there be an exception? Also, you'd respawn at start after dying the second time.
Gez wrote:besides, a trap that makes you telefrag barrels would be "death by actor", not "death by the world"
More to the point: Deaths not caused directly by monsters or other players.
Gez wrote:same for being teleported at a HateTarget point surrounded by 128 cyberdemons scripted to fire at the spot constantly
What non-jokewad even does something like this?

A timer is still going to fail if the trap isn't repeatedly fatal in a short timespan: Damaging floors don't kill you fast enough, death pits don't kill you again at all unless you can get out, and one-shot crushers aren't going to do it either. Your only option is hoping the kill command isn't prohibited by game flags. (Speaking of which, it seems like kill should force you back to a start spot regardless, as its main use would be to get out of a stuck place.)

Maybe the best solution is to offer some other means for the player to say "no, respawn at start". Barring something waterproof, the only solution to not getting respawned in an inappropriate spot is to not use this DMFlag.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by Graf Zahl »

The only robust solution is to disable this option. Period. It's unstable by design and there's nothing that can be done about it. I certainly won't touch it.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by Edward-san »

If someone of us changes sv_samespawnspot to an int cvar, with the values: 'off', 'respawn on the lowest floor', 'respawn on the closest 3dfloor', 'respawn midair', would it be okay?
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: [2.8pre-818-gee74ac2] sv_samespawnspot doesn't like 3dfl

Post by edward850 »

Couldn't see why not, although it's actually a dmflag, and it'll need moving to support extra options.
Post Reply

Return to “Closed Bugs [GZDoom]”