Page 1 of 1

A_FireProjectile returns null at point-blank range

Posted: Thu Jul 07, 2022 10:15 am
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).

Re: A_FireProjectile returns null at point-blank range

Posted: Thu Jul 14, 2022 12:01 am
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.