fa icon indicating copy to clipboard operation
fa copied to clipboard

Medusa don't stun if they die before projectile hits.

Open RabidPope opened this issue 2 years ago • 3 comments

If a medusa fires a shot and then dies, the shot wont stun.

To reproduce, make a medusa fire a shot and ctrl k it.

Tried it with the aeon bomber and it does not have the same bug. Medusa shot

RabidPope avatar Jun 24 '22 22:06 RabidPope

Here it is: https://github.com/FAForever/fa/blob/deploy/fafdevelop/lua/sim/Projectile.lua#L596 The destroyed Shimmer falling through the air still counts as a launcher, but a Medusa on the ground turns into a wreck immediately.

Hdt80bro avatar Jun 25 '22 09:06 Hdt80bro

So im guessing the stun value needs to be stored in a variable on the projectile when fired?

RabidPope avatar Jun 25 '22 15:06 RabidPope

The problem is that area buffs need an instigator to determine the army, and when the launcher dies, there's nothing left. You could use the projectile itself, except that it isn't a unit. This is a requirement that makes sense for literally all buffs except STUN. All the AddBuff method does with the unit when it's a stun type is get its army, which we can easily extracted from the projectile. I'll put together a PR.

Hdt80bro avatar Jun 25 '22 21:06 Hdt80bro