[Decorate] "Don't Bounce on Shootable" Flag

Moderator: GZDoom Developers

Post Reply
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

[Decorate] "Don't Bounce on Shootable" Flag

Post by NeuralStunner »

I found that ALLOWBOUNCEONACTORS only does half of what I want it to: While it does allow a projectile to bounce off of non-shootable props, it only checks whether the actor bleeds or not. Hence, it will bounce off of non-bleeding but damagable actors. (Barrels, Sabreclaws, and Pods, and Hexen Pottery are a few examples.) I'd suggest another flag to compliment it, which would cause the projectile to explode as normal on actors that are SHOOTABLE and not DORMANT.

I can't think of a good name other than DONTBOUNCEONSHOOTABLE.

Obviously, this would be pointless when combined with BOUNCEONACTORS, so the latter should probably have "final say" on whether the projectile should bounce.
User avatar
printz
Posts: 2648
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: [Decorate] "Don't Bounce on Shootable" Flag

Post by printz »

Man, the bouncing rule set is so complex in ZDoom.
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Re: [Decorate] "Don't Bounce on Shootable" Flag

Post by Ryan Cordell »

At least it's not the Grapple rule set from D&D. :P
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: [Decorate] "Don't Bounce on Shootable" Flag

Post by Gez »

printz wrote:Man, the bouncing rule set is so complex in ZDoom.
I blame Lee Killough. Three quarters of the complexity is entirely because of MBF and its accursed BOUNCES flag. The rest is just a result of conciliating Heretic Bounce, Hexen Bounce, Strife Bounce and ZDoom's original bouncing code; with a sprinkle of feature requests once the bouncing code was overhauled to approximate something resembling sanity out of the whole mess.
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Decorate] "Don't Bounce on Shootable" Flag

Post by NeuralStunner »

printz wrote:Man, the bouncing rule set is so complex in ZDoom.
Other than this, they're surprisingly simple.

Other than the combination of BOUNCEAUTOOFF and MBFBOUNCER rendering the former inoperable. (I got the impression from the Wiki that these are supposed to work together and cause the projectile to stop completely.) I wonder if this might be a bug.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [Decorate] "Don't Bounce on Shootable" Flag

Post by Graf Zahl »

Yeah, definitely not complex. Here's why this has been collecting dust:

Code: Select all

    if (BlockingMobj && ((BlockingMobj->flags2 & MF2_REFLECTIVE) && (BlockingMobj->flags7 & MF7_THRUREFLECT))) return true;
    if (mo && BlockingMobj && ((mo->BounceFlags & BOUNCE_AllActors)
        || ((mo->flags & MF_MISSILE) && (!(mo->flags2 & MF2_RIP) 
        || (BlockingMobj->flags5 & MF5_DONTRIP) 
        || ((mo->flags6 & MF6_NOBOSSRIP) && (BlockingMobj->flags2 & MF2_BOSS))) && (BlockingMobj->flags2 & MF2_REFLECTIVE))
        || ((BlockingMobj->player == NULL) && (!(BlockingMobj->flags3 & MF3_ISMONSTER)))))
 
User avatar
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [Decorate] "Don't Bounce on Shootable" Flag

Post by Rachael »

With that many conditionals we might as well start programming butler robots.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [Decorate] "Don't Bounce on Shootable" Flag

Post by Graf Zahl »

Added a workaround. This needs some testing because I am not entirely convinced it is the best way to handle it.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”