New Console commands

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: New Console commands

Re: New Console commands

by Graf Zahl » Tue Aug 18, 2015 5:23 pm

Resurrect is some quick'n dirty cheat to quickly undo a player death. As soon as the body is gone that's no longer possible. Do not expect me to waste any thoughts on it.

Re: New Console commands

by Fishytza » Tue Aug 18, 2015 3:09 am

Would this idea be too troublesome?

APlayerChunk (the detached head) is given a new variable called 'BodyClass'.
A_SkullPop and A_FreezeDeathChunks will store the body's classname (I think that's TypeName, isn't it?) as the APlayerChunk's BodyClass.

When the player calls the resurrect cheat and if the current pawn is a APlayerChunk, check the 'BodyClass' variable. If the class is valid and of type APlayerPawn, spawn the new body, transfer the inventory from the chunk to the new body, attach the body to the player, do whatever else is necessary when giving new bodies to players, and remove the chunk.

Re: New Console commands

by edward850 » Mon Aug 17, 2015 7:01 pm

Xaser wrote:Thinking about it, I wonder what it is that makes co-op respawning always work.
Put simply, it's easier to make a new body than it is to reuse an old one. :P
But yes, a respawn cheat makes a lot of sense.

Re: New Console commands

by NeuralStunner » Mon Aug 17, 2015 6:23 pm

A respawn cheat, basically? Seems like it could have its uses.

Re: New Console commands

by Xaser » Mon Aug 17, 2015 5:36 pm

Gez's idea wouldn't work in the body-vanishes case, but it'd help for the rest (skullpops in particular). Better than nothing.

Thinking about it, I wonder what it is that makes co-op respawning always work. Plenty o' special coding around that case that is probably rooted pretty deep, but I'm curious if it's possible to bootstrap that to make a less-problematic system. Teleport flashes optional. :P

Re: New Console commands

by edward850 » Mon Aug 17, 2015 4:41 pm

In this weird competition between Xaser and Major Cook that they never knew they were in, they somehow both win. A draw? How boring.

They player indeed looses everything that made them that player (at a glance, I'm not exactly sure how they keep their inventory, seeing as that's also lost), but they are also no longer a valid playerpawn. Trying to resurrect that would result in some cthulhuian horror.

There's also a bit of a problem with Gez's idea. You can technically be detached and then have your old body removed. In fact I think that's exactly what happens with ice deaths.

Not really sure why you'd want to put in the effort to change this, honestly. The resurrect command is and always will be a kludge command. Reviving the player is always imperfect.

Re: New Console commands

by Gez » Mon Aug 17, 2015 4:36 pm

I could imagine having the detached head get the main body in a pointer (probably master) and then it becomes easy to resurrect the player by checking if the bodyless viewpoint has a valid body pointer.

inb4 "it's going to break mods because someone will have somehow decided to use pointer manipulation on a detached head for ??? purpose"

Re: New Console commands

by phantombeta » Mon Aug 17, 2015 3:37 pm

(Warning: This might be completely wrong.)
I'd guess it's because respawning (Creating a new player actor AFAIK) the player instead of reusing the existing playerPawn the player is currently in (Which AFAIK is a bad thing because dead playerPawns shouldn't be revived) would be inconsistent...
Maybe make a "respawn" CCMD that respawns the player where his body is while ignoring any DMFlags and not spawning a telefog actor?

Re: New Console commands

by Xaser » Mon Aug 17, 2015 2:00 pm

Speaking without looking at the guts of the code, the issue is something along the lines of the player's viewpoint being switched to a different actor than the playerpawn itself (which holds the player's inventory, etc). Notice how Hexen players' death frames are on the player actor itself while the head (where the viewpoint goes) is a new actor that gets spawned via A_SkullPop.

Frankly it's an annoying situation I'd love to be rectified somehow, though I'd have to spend time mucking about with the code to see where to start (if it's indeed possible).

Re: New Console commands

by Xeotroid » Mon Aug 17, 2015 1:20 pm

Why is it impossible to resurrect player after he's decapitated / shattered to pieces, anyway? Couldn't you just respawn in place of your decapitated head or head-less body?

Re: New Console commands

by edward850 » Mon Aug 17, 2015 8:32 am

Major Cooke wrote:Unless your body disappears.
If your body dissappears, there is no longer a game for you to resurrect in. ;)

Also, you forgot skullpopping. Or basically "any body detaching scenario" pretty much sums it up.

Re: New Console commands

by Major Cooke » Mon Aug 17, 2015 8:00 am

Unless your body disappears. And if you become frozen, you can still resurrect as long as you haven't shattered.

Re: New Console commands

by JPL » Sun Aug 16, 2015 11:14 pm

jacob_jub wrote: 2. Give_Uponload : I.E Give_uponload health so if you accidentally save the moment before you die you can still continue on with the level.
Consider the "resurrect" command, it raises you back to 100 health after death with all the stuff you had previously.

Re: New Console commands

by Xeotroid » Tue Aug 11, 2015 9:02 am

jacob_jub wrote:1. Nextlevel : for when you cant find an exit for a level and dont want to use idclev because then you'd lose all of your weapons.
Use the Changemap command, you keep your weapons that way but you have to specify the map name, eg. "changemap map02" or "changemap e2m8". There is also the Nextmap command, but that resets your inventory which is what you're trying to avoid.

Re: New Console commands

by Graf Zahl » Tue Aug 11, 2015 8:53 am

1. Already in
2. no

Top