fabiangreffrath / crispy-doom

Crispy Doom is a limit-removing enhanced-resolution Doom source port based on Chocolate Doom.
https://fabiangreffrath.github.io/crispy-homepage
GNU General Public License v2.0
800 stars 131 forks source link

Make sure missiles aren't absorbed by outdoor walls #125

Closed plumsinus closed 8 years ago

plumsinus commented 8 years ago

Now that Crispy does bullet puffs in outdoor areas, this might also be (partly) fixable? It happens with enemy projectiles as well.

https://www.doomworld.com/vb/doom-general/69536-why-do-some-upper-lower-textures-in-backside-absorb-missiles/

I say partly, because it's a little more complicated; rockets must always be absorbed since their explosion is more than cosmetic. Maybe the BFG too, I don't know offhand how walls absorbing the BFG shot affects its tracer blast.

fabiangreffrath commented 8 years ago

Well, this is a different pair of shoes than bullet puffs. As you state yourself, bullet puffs are only cosmetic and do no harm - quite in contrast to rocket explosions. Sure, I could add "harmless" explosions. But honestly, I think en explosion without splash damage would be even more confusing than an absorbed projectile?

fabiangreffrath commented 8 years ago

And, I am not going to wrap this into some (if !demorecording) stuff.

plumsinus commented 8 years ago

I agree that harmless rocket explosions would be bad. My thoughts were to omit checking for rocket (and maybe BFG) explosions, but have other projectiles explode with proper sprites and sounds.

fabiangreffrath commented 8 years ago

This is the relevant code in PrBoom+ (in P_XYMovement()):

      if (ceilingline &&
          ceilingline->backsector &&
          ceilingline->backsector->ceilingpic == skyflatnum)
        if (demo_compatibility ||  // killough
      mo->z > ceilingline->backsector->ceilingheight)
          {
      // Hack to prevent missiles exploding
      // against the sky.
      // Does not handle sky floors.

      P_RemoveMobj (mo);
      return;
          }
      P_ExplodeMissile (mo);
    }

See the if (demo_compatibility ... check? Boo!

But I have another idea. I'd like to let the rocket explode, but skip the first explosion state -- the one that also calls the splash damage code. This will make the explosion appear shorter. Also, I'd like to leave the impression of a misfire, so there should be a sound different from the explosion sound. Do you know of a sound in Doom that sounds something like "gulp!"? ;)

fabiangreffrath commented 8 years ago

My thoughts were to omit checking for rocket (and maybe BFG) explosions, but have other projectiles explode with proper sprites and sounds.

If we need to special-case rocket and BFG explosions (we do!), this leaves us with plasma projectiles and the enemies' weaponry.

I'd like to let the rocket explode, but skip the first explosion state

I have a better idea that is compatible with Dehacked state tables and the enemies' weaponry: I'll skip to the latest state after the projectile's actual deathstate that does not call any action pointer.

Now I just need a demo that shows this glitch to test my ideas against...

fabiangreffrath commented 8 years ago

so there should be a sound different from the explosion sound

How about sfx_punch? It really sounds like "flap!" and could be the sound of a failed missile ignition.

fabiangreffrath commented 8 years ago

Hm, on the other hand, this approach will still leave us with noticeable explosions -- albeit shorter ones, but it's still misleading. And, I am not really into adding random sounds.