Bounce states not entered when hitting top/bottom of actors

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Bounce states not entered when hitting top/bottom of actors

Postby Marisa Kirisame » Fri Aug 24, 2018 7:19 am

Whenever a bouncer hits an actor from above or below, the bounce happens normally but they don't enter any bounce state if the USEBOUNCESTATE flag is on, they only do if the actor is hit from the sides.

Here's a small map where you can see the problem in action.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Bounce states not entered when hitting top/bottom of act

Postby Major Cooke » Mon Aug 27, 2018 8:36 am

That... reminds me. Sometimes actors bounce improperly off the top of actors too, or maybe that was fixed? I don't remember honestly but that was also something a while ago.
User avatar
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Bounce states not entered when hitting top/bottom of act

Postby Marisa Kirisame » Mon Aug 27, 2018 3:57 pm

You mean cases where the bouncers would just slide along the top of the actor? I think that doesn't happen anymore.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Bounce states not entered when hitting top/bottom of act

Postby Major Cooke » Tue Aug 28, 2018 11:10 am

Yeah, that's the one.
User avatar
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Bounce states not entered when hitting top/bottom of act

Postby comet1337 » Tue Aug 28, 2018 3:26 pm

what about bouncers getting sucked inside walls if their edge clips a corner?
User avatar
comet1337
 
Joined: 25 Sep 2015
Location: elsewhere

Re: Bounce states not entered when hitting top/bottom of act

Postby Marisa Kirisame » Tue Aug 28, 2018 4:07 pm

That can happen with non-bouncers too. It's a glitch with pretty much anything that moves fast and has a small radius.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Bounce states not entered when hitting top/bottom of act

Postby Cacodemon345 » Fri Aug 31, 2018 9:36 am

I just noticed this in GZDoom's code in P_BounceActor method. In line 3644 of p_map.cpp:
Code: Select allExpand view
      if (!ontop)
      {
         DAngle angle = BlockingMobj->AngleTo(mo) + ((pr_bounce() % 16) - 8);
         double speed = mo->VelXYToSpeed() * mo->wallbouncefactor; // [GZ] was 0.75, using wallbouncefactor seems more consistent
         if (fabs(speed) < EQUAL_EPSILON) speed = 0;
         mo->Angles.Yaw = angle;
         mo->VelFromAngle(speed);
         mo->PlayBounceSound(true);
         if (mo->BounceFlags & BOUNCE_UseBounceState)
         
The code for the Bounce State entering is under the if statement and does not exist in the else statement, causing bug.
Cacodemon345
 
Joined: 22 Dec 2017
Discord: Cacodemon345#9151

Re: Bounce states not entered when hitting top/bottom of act

Postby Cacodemon345 » Fri Aug 31, 2018 10:21 am

Cacodemon345
 
Joined: 22 Dec 2017
Discord: Cacodemon345#9151


Return to Bugs

Who is online

Users browsing this forum: XxMiltenXx and 2 guests