Bounce states not entered when hitting top/bottom of actors

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
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Bounce states not entered when hitting top/bottom of actors

Post by Marisa the Magician »

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
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

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

Post by Major Cooke »

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
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

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

Post by Marisa the Magician »

You mean cases where the bouncers would just slide along the top of the actor? I think that doesn't happen anymore.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

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

Post by Major Cooke »

Yeah, that's the one.
User avatar
comet1337
Posts: 876
Joined: Fri Sep 25, 2015 3:48 am
Location: elsewhere

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

Post by comet1337 »

what about bouncers getting sucked inside walls if their edge clips a corner?
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

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

Post by Marisa the Magician »

That can happen with non-bouncers too. It's a glitch with pretty much anything that moves fast and has a small radius.
Cacodemon345
Posts: 419
Joined: Fri Dec 22, 2017 1:53 am
Graphics Processor: ATI/AMD (Modern GZDoom)
Contact:

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

Post by Cacodemon345 »

I just noticed this in GZDoom's code in P_BounceActor method. In line 3644 of p_map.cpp:

Code: Select all

		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
Posts: 419
Joined: Fri Dec 22, 2017 1:53 am
Graphics Processor: ATI/AMD (Modern GZDoom)
Contact:

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

Post by Cacodemon345 »

Post Reply

Return to “Closed Bugs [GZDoom]”