acemod / ACE3

Open-source realism mod for Arma 3
https://ace3.acemod.org
Other
995 stars 735 forks source link

Weapon cook off does not work when unit is moving with weapon not up #8569

Open diwako opened 2 years ago

diwako commented 2 years ago

Mods (complete and add to the following information):

Description: Weapon cook off does not make the gun fire when jogging or running with gun lowered. This is as in not using the combat pace option.

You still get the pop ups saying your gun just cooked off

Steps to reproduce:

  1. Make weapon hot hot hot until it cooks off
  2. start jogging or running

Expected behavior: Gun fires anyways, jogging does not stop the carnage

Where did the issue occur?

Drofseh commented 2 years ago

Hmm, i thought I had tested that and forceWeaponFire moved the gun up.

diwako commented 2 years ago

it does when standing still.

10Dozen commented 2 years ago

Yup, i got same in EJAM mod when tried to make 'runaway' gun - m249 goes brrrr, keeps silent while i run and then makes brrrr again once i stopped :D

Guess there is some property in run/sprint animation that prevents shooting sequence. Delaying shooting until it's possible will also cause problems - if we run or ride into the vehicle for some time (e.g. shoot from FFV and then returned to cargo seat) - it will be confusing that gun shoots afterward.

So maybe manual sfx (sound & smoke) and bullet spawn is needed here. Or just skip cookoff if not actually possible to make a shot now.

ZluskeN commented 2 years ago

How about using forcewalk? It is a bad idea to run around with a rampant firearm after all. https://community.bistudio.com/wiki/forceWalk

10Dozen commented 2 years ago

Yeah, forceWalk is good for 'runaway', but there are still some animations that cancel fire - e.g. on inventory open there is some transition animation that stops fire for a second. So i am curious about how it can be handled in case of this particular bug.

diwako commented 2 years ago

Personally, I would try out allowing shooting on the current canceling animations. Worst that could happen is AI just shooting while running around or maybe it breaks the raise weapon/ready action when clicking once.

Drofseh commented 2 years ago

Personally, I would try out allowing shooting on the current canceling animations. Worst that could happen is AI just shooting while running around or maybe it breaks the raise weapon/ready action when clicking once.

I'm not sure what you mean here, what canceling animation?

Drofseh commented 2 years ago

Using forceWalk isn't as bad as I feared it would be. When you are sprinting, are set to forceWalk, and then the forceWalk condition is removed, you go right back to sprinting.

There needs to be a slight delay between being forceWalk being turned on and the fired event though, to give time for the animation to change, or else the weapon doesn't actually fire.

10Dozen commented 2 years ago

Another thought - to apply some custom animation to hands via playAction (like 'Radio Animations' mods do) with shooting allowed (CfgGesturesMale > States > CustomAnim.disableWeapons = 0;). In theory it won't stop moving anim, but allows shots to be done.

diwako commented 2 years ago

Personally, I would try out allowing shooting on the current canceling animations. Worst that could happen is AI just shooting while running around or maybe it breaks the raise weapon/ready action when clicking once.

I'm not sure what you mean here, what canceling animation?

I mean the current animations that do not allow firing.

Drofseh commented 2 years ago

I think the best solution in the end will be to remove the use of forceWeaponFire and instead spawn the projectile and effects and play audio. This will allow cookoffs to happen in all situations, regardless of the weapon being currentWeapon and even when the player is inside a vehicle.

I've been looking into how to do this, but I'd like some help if anyone has time.