A_FireProjectile returns null at point-blank range

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.
User avatar
Jekyll Grim Payne
Posts: 936
Joined: Mon Jul 21, 2008 4:08 am
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Graphics Processor: nVidia (Modern GZDoom)

A_FireProjectile returns null at point-blank range

Post by Jekyll Grim Payne »

Might be a case of this, however, the explanation in that thread doesn't seem applicable.

I'm not sure if this is a bug or an oversight. I tested in 4.8.0, 4.8.2 and I remember seeing this behavior earlier as well.

A_FireProjectile returns null when a projectile is fired into a wall or an enemy at a point-blank range, even if the projectile is NOT actually destroyed but instead enters a Death/Crash/XDeath state sequence. This makes no sense to me, since projectiles may still exhibit complex behavior at that point (for example, I need to dynamically set a spawned projectile's sprite and damage from the weapon when it's fired).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47995
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_FireProjectile returns null at point-blank range

Post by Graf Zahl »

Obviously this cannot be changed because it would alter the semantics of this function.
So now the function will pass through the second return value of SpawnPlayerMissile which contains what you need.

Return to “Closed Bugs”