[All] Player bobbing in air

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
Cherepoc
Posts: 60
Joined: Wed Sep 08, 2004 1:26 pm
Location: Russia

[All] Player bobbing in air

Post by Cherepoc »

I don't know if it is a bug, or not. While in the air, the player is still bobbing. You can notice it even when you do regular jumps, but if you jump in a sector with low gravity, it looks really weird. Also, it doesn't looking good when player is swimming, but at least, it's not so weird.
As I remember, Legacy players weren`t bobbing both in air and water.
Can bobbing be removed while jumping/swimming?
User avatar
Jimmy
 
 
Posts: 4725
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Re: [All] Player bobbing in air

Post by Jimmy »

I take it you mean weapon bobbing and not view bobbing?
User avatar
Rachael
Posts: 13913
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [All] Player bobbing in air

Post by Rachael »

Or could you also possibly mean the player himself, when viewed by an external camera?
User avatar
Enjay
 
 
Posts: 26935
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [All] Player bobbing in air

Post by Enjay »

I think he means weapon bobbing - if so, why shouldn't the weapon bob when you are moving - even if it is a jump or a swim? Personally, I think that looks much better than suddenly not moving - especially if it snapped to a neutral central position from wherever it was on the bob when the jump (etc) started. I know that I'd find it difficult to hold a weapon absolutely steady when jumping or swimming. :P

The Doom weapon bob is a pretty primitive sway animation that, IMO, looks equally bad and good in all the circumstances mentioned.
User avatar
Cherepoc
Posts: 60
Joined: Wed Sep 08, 2004 1:26 pm
Location: Russia

Re: [All] Player bobbing in air

Post by Cherepoc »

No, I mean player camera. Just set low gravity, run and then jump. This looks like player is walking in the air.
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: [All] Player bobbing in air

Post by Gez »

Build a two-sector map in vanilla. A square sector neighboring another square sector, with as large a height difference between both floors as the engine will allow, but the same ceiling height. Put the player start on the high floor sector. Run from it and fall down to the low floor sector. During the fall, keep moving forward and look if you are bobbing or not.
User avatar
Cherepoc
Posts: 60
Joined: Wed Sep 08, 2004 1:26 pm
Location: Russia

Re: [All] Player bobbing in air

Post by Cherepoc »

It's bobbing. It's difficult to notice that with normal gravity, with low it's definitely bobbing
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: [All] Player bobbing in air

Post by Gez »

I mean, does it bob in plain old vanilla DOOM.EXE too?
User avatar
Cherepoc
Posts: 60
Joined: Wed Sep 08, 2004 1:26 pm
Location: Russia

Re: [All] Player bobbing in air

Post by Cherepoc »

Looks like it does... But I can't say for sure. It's hard to find that out without low gravity
User avatar
Cherepoc
Posts: 60
Joined: Wed Sep 08, 2004 1:26 pm
Location: Russia

Re: [All] Player bobbing in air

Post by Cherepoc »

Another interesting fact. When turning on nogravity flag, camera will bob when player standing on ground, but won't bob while player is in air. That's the right behaviour=)
That also works for vanilla.
User avatar
Cherepoc
Posts: 60
Joined: Wed Sep 08, 2004 1:26 pm
Location: Russia

Re: [All] Player bobbing in air

Post by Cherepoc »

I'm not experienced in fixing bugs. I don't even know how to make code patches(posted in code submissions). However, I found this in p_user.cpp (zdoom 2.3.1 src)

line 1513: void P_CalcHeight (player_t *player)
___blah blah___
line 1528: if ((player->mo->flags & MF_NOGRAVITY) && !onground)

Cheks if player isn't standing on ground and have NOGRAVITY flag. So, this turns off movement bobbing if player have nogravity flag (by entering fly cheat for example) AND is in air. Shouldn 't that be changed to something like this?

if (((player->mo->flags & MF_NOGRAVITY) && !onground) || !onground)

So it checks if player is in air with nogravity flag set, or simply when he is in air.
EDIT. Wait, isn't that just

if ( !onground)

My maths is sooo bad...
I can't test this right now, I'm downloading vc++ and stuff, so it will take some days.

EDIT2:
(needs to be calculated for gun swing even if not on ground)
Damn... Is it really needed even if not on ground?
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: [All] Player bobbing in air

Post by Gez »

Well, the player might be walking on bridges or other non-ground things.
User avatar
Cherepoc
Posts: 60
Joined: Wed Sep 08, 2004 1:26 pm
Location: Russia

Re: [All] Player bobbing in air

Post by Cherepoc »

The main problem is "weapon bobbing weirdness". Use fly cheat - fly in air, then on ground and look at the weapon. To fix movement bobbing bug the weapon bobbing code must be rewritten. :(
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [All] Player bobbing in air

Post by Graf Zahl »

Why was still here? :?
User avatar
Cutmanmike
Posts: 11351
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: [All] Player bobbing in air

Post by Cutmanmike »

I wouldn't actually mind a way to turn that bobbing off if possible. Maybe through setplayerproperty with a set of 2?
Post Reply

Return to “Closed Bugs [GZDoom]”