Page 1 of 1

OnProjectileHit bouncy bullets are flagged for removal

Posted: Wed Mar 25, 2020 10:26 am
by Danger Ross
Is this by design or a bug?
I've noticed that bouncy bullets that impact something that would break a normal bullet trigger the same flags despite not being removed. It was a little confusing to me because intuitively I understand that the bouncy bullet would still "survive" and not be removed.

This happens on the ProjectileHitCallback event.

Re: OnProjectileHit bouncy bullets are flagged for removal

Posted: Wed Apr 15, 2020 12:37 pm
by NearHuscarl
I think technically the game spawns a new projectile with the deflected angle and removes the old one, which is not what happen visually, This should be a bug because RemoveFlag's only job is to indicate whether the bullet still survives or not, which it fails to do.

Re: OnProjectileHit bouncy bullets are flagged for removal

Posted: Sat Apr 25, 2020 2:51 pm
by Gurt
Fixed after v.1.3.5:
ScriptAPI: Added ProjectileHitArgs.IsDeflection, ProjectileHitArgs.DeflectionNormal to be able to read if a projectile hit is a deflection during ProjectileHitCallback.
ScriptAPI: ProjectileHitArgs.RemoveFlag is now false during deflections.
ScriptAPI: ProjectileHitCallback is now fired on blocking players and on ProjectileDeflectZone.
ScriptAPI: Added IProjectile.PowerupTotalBounces to read projectile's maximum total bounces that can be performed. IProjectile.BounceCount can now be written to to change current amount of bounces.
A player deflecting a bullet now counts towards the projectile's total bounce count property as if it would hit a wall during the bounce powerup.