Bouncing projectiles don't hurt when hitting top/bottom

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!

Bouncing projectiles don't hurt when hitting top/bottom

Postby Marisa Kirisame » Wed Oct 09, 2019 7:07 am

Bouncing projectiles explode/die as expected, but don't deal damage to the actor they hit. Linked here is an example to show this behaviour. I'd check if the bug happens on 4.2.1 but I can no longer compile it due to glibc updates and versioned symbol nonsense.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Bouncing projectiles don't hurt when hitting top/bottom

Postby Marisa Kirisame » Fri Mar 06, 2020 1:20 am

Is anyone ever going to bother with this? A crapton of mods trigger this bug, you know.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Bouncing projectiles don't hurt when hitting top/bottom

Postby SanyaWaffles » Fri Mar 06, 2020 5:48 am

This explains the weird behavior I've been experiencing with DD2's gem bombs.

Let me see if I can reproduce it.
User avatar
SanyaWaffles
Navy Did Nothing Wrong
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Bouncing projectiles don't hurt when hitting top/bottom

Postby Major Cooke » Mon Mar 09, 2020 4:33 pm

There's a couple ways this could be fixed.

I could either move the P_DamageMobj call into P_ExplodeMissile that's found in PIT_CheckThing (p_map.cpp line 1565), ensuring P_ExplodeMissile accurately handles all future impact damage appropriately:
Code: Select allExpand view
damage = tm.thing->GetMissileDamage((tm.thing->flags4 & MF4_STRIFEDAMAGE) ? 3 : 7, 1);
if ((damage > 0) || (tm.thing->flags6 & MF6_FORCEPAIN) || (tm.thing->flags7 & MF7_CAUSEPAIN))
{
   int newdam = P_DamageMobj(thing, tm.thing, tm.thing->target, damage, tm.thing->DamageType);
   //...


Or I could go the simple route and insert P_DamageMobj here:

Code: Select allExpand view
if (Vel.Z != 0 && (BounceFlags & BOUNCE_Actors))
{
   bool res = P_BounceActor(this, onmo, true);
   // If the bouncer is a missile and has hit the other actor it needs to be exploded here
   // to be in line with the case when an actor's side is hit.
   if (!res && (flags & MF_MISSILE))
   {
      P_ExplodeMissile(this, nullptr, onmo);
   }
}


Which one seems better? The former, I can include a boolean that disables damage as needed.
User avatar
Major Cooke
d = klabs(wall[wall[wall[sector[dasect].wallptr].point2].point2].x-s->x)...
 
Joined: 28 Jan 2007

Re: Bouncing projectiles don't hurt when hitting top/bottom

Postby Marisa Kirisame » Tue Mar 10, 2020 3:40 am

wouldn't calling explodemissile cause the projectile to, you know, explode, even in cases where they might still keep bouncing?
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Bouncing projectiles don't hurt when hitting top/bottom

Postby Graf Zahl » Tue Mar 10, 2020 3:42 am

Yes. It's also not the function inflicting the damage.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Bouncing projectiles don't hurt when hitting top/bottom

Postby Major Cooke » Tue Mar 10, 2020 7:30 am

If neither of those are fitting solutions, what is?
User avatar
Major Cooke
d = klabs(wall[wall[wall[sector[dasect].wallptr].point2].point2].x-s->x)...
 
Joined: 28 Jan 2007

Re: Bouncing projectiles don't hurt when hitting top/bottom

Postby Graf Zahl » Tue Mar 10, 2020 7:36 am

That's the problem, I don't really know how to do it without causing unintended side effects.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Bouncing projectiles don't hurt when hitting top/bottom

Postby SanyaWaffles » Wed Mar 18, 2020 2:46 pm

This is becoming extremely noticeable at times in my project. You can hit an enemy square on the top and there's no damage or whatever when using bouncing bombs. It's an extremely aggravating bug and there's no way to fix.
User avatar
SanyaWaffles
Navy Did Nothing Wrong
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Bouncing projectiles don't hurt when hitting top/bottom

Postby Major Cooke » Wed Mar 18, 2020 4:41 pm

It might be worth going back to Cacodemon345's commits and finding out what he fixed.
User avatar
Major Cooke
d = klabs(wall[wall[wall[sector[dasect].wallptr].point2].point2].x-s->x)...
 
Joined: 28 Jan 2007


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest