Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHS RKG-3M/BRK M79 grenades not compatible with advanced throwing. #7534

Closed
severgun opened this issue Feb 18, 2020 · 21 comments
Closed

RHS RKG-3M/BRK M79 grenades not compatible with advanced throwing. #7534

severgun opened this issue Feb 18, 2020 · 21 comments
Labels

Comments

@severgun
Copy link
Contributor

Mods (complete and add to the following information):

  • Arma 3: 1.96 stable
  • CBA: 3.14 stable
  • ACE3: 3.13 stable

Description:
This scripted grenades explode on players position.

Steps to reproduce:

  • Go to editor
  • Spawn unit with rhssaf_mag_brk_m79 rhsgref_mag_rkg3em grenades
  • Try to throw with adv. throwing

Expected behavior:
As regular throw. Fly, deploy parachute, explode on hit.

Where did the issue occur?

  • Tested in Editor (Singleplayer). Occur everywhere.
@Whigital
Copy link
Contributor

Needs similar compat entries in config as in #6879 ?

@Whigital
Copy link
Contributor

Whigital commented Feb 19, 2020

Pretty sure this has to do with the rhs_fuseTime config value and the WaitAndExecute delay here:

], 0.3] call CBA_fnc_waitAndExecute;

The RHS nade script uses the fuseTime values as delay too:
https://gist.github.com/Blutze/3b6edb13818b22649d6f2cc3c63ec963#file-rhs-at-nades-L101
https://gist.github.com/Blutze/3b6edb13818b22649d6f2cc3c63ec963#file-rhs-at-nades-L169

Tested with rhs_fuseTime[] = {0.20,0.25,0.3} for rhsgref_ammo_rkg3em and rhs_fuseTime[] = {0.45,0.45,0.45} for rhssaf_ammo_brk_m79.

rhsgref_ammo_rkg3em almost consistently got deployed at your feet, while rhssaf_ammo_brk_m79 followed the throwing arc.

@severgun
Copy link
Contributor Author

severgun commented Feb 20, 2020

Needs similar compat entries in config as in #6879 ?

There is no config entries in that PR. It actually remove some old dirty hacks.

Tested with rhs_fuseTime[] = {0.20,0.25,0.3} for rhsgref_ammo_rkg3em and rhs_fuseTime[] = {0.45,0.45,0.45} for rhssaf_ammo_brk_m79.

Hmm. OK will try to increase this deploy delay and test later today

@Whigital
Copy link
Contributor

True, the PR only hooks into whatever the "Throw" event has defined for the specific class.

In this instance, the rhs_fuseTime values should be incresed above the 0.3 delay used in ace_advanced_throwing_fnc_throw. Perhaps even have that 0.3 added to the default values.

Don't know what effect it has on the functionality of the nades though, if the rhs_fuseTime values are set too high.

There is also no compat for RHS SAF, so don't know how to deal with rhssaf_ammo_brk_m79.

@severgun
Copy link
Contributor Author

severgun commented Feb 20, 2020

As much as I understood looking rhs code rhs_fuseTime[] = {0.20,0.25,0.3} is random [0.20,0.25,0.3] delay before regular grenade will be replaced with grenade which has parachute model and shotShell simulation type. So now it is being replaced in hands, fall and explode on contact with ground or body.

@Whigital
Copy link
Contributor

Yeah, my conclusion aswell. I'll do some tests with the default values increased by 0.3 and compare the behavior against running vanilla RHS values without ACE. If it doesn't cause any issues, i'll update GREF compat for rhsgref_ammo_rkg3em.

Dunno how to handle the SAF one though. Add new compat for SAF, or add SAF dependency in GREF compat ?

@Whigital
Copy link
Contributor

Adding 0.3 to the default values seems to produce the same behavior with adv. throw. as without ace loaded, so will will update ace_compat_rhs_gref3 with those values.

@severgun
Copy link
Contributor Author

Pretty acceptable fix was closed...
just need to remake delay from +0.3 to +0.05 and no one will notice.

Other issue with adv. throwing is that it is always weaker than "Normal Throw". But this should be discussed in other ticket

@commy2
Copy link
Contributor

commy2 commented Feb 22, 2020

Pretty acceptable fix was closed...

and

Theoretically, what can happen is that grenade will hit target before metamorphosis and disappear.

do not add up though.

@severgun
Copy link
Contributor Author

severgun commented Feb 24, 2020

Grenade without ACE have 0.3 sec delay by default.
So will you notice difference between 0.3 and 0.35?
NO.
How far it will fly away in 0.05 sec?

@dedmen
Copy link
Contributor

dedmen commented Feb 25, 2020

What do you prefer, a grenade exploding right in your face, or that a grenade sometimes despawns?

@commy2
Copy link
Contributor

commy2 commented Feb 25, 2020

The false dichotomy.

@Whigital
Copy link
Contributor

Whigital commented Feb 25, 2020

What about wrapping the throwFiredXEH event in fnc_prime with a CBA_fnc_waitAndExecute to sync with the delay in fnc_throw ?

[QGVAR(throwFiredXEH), [
_unit, // unit
"Throw", // weapon
_muzzle, // muzzle
_muzzle, // mode
_throwableType, // ammo
_throwableMag, // magazine
_activeThrowable // projectile
]] call CBA_fnc_globalEvent;

Should delay the firing any 3rd party nade script enough. Don't know if it might have any other adverse effects though 😕.

@severgun
Copy link
Contributor Author

severgun commented Mar 2, 2020

Take my words back. Setting delays to +0.05s is not acceptable fix.
Grenade must fly 0.3 sec in regular grenade shape and only after that switch to one with parachute deployed.
With 0.35 and adv throw it fly only 0.5 sec, then switch and start decelerating and fall at very close distance.

@commy2
Copy link
Contributor

commy2 commented Mar 2, 2020

Anyone post this omnious RHS script, so people that don't want to download gigabytes of
can see what the issue may be?

@severgun
Copy link
Contributor Author

severgun commented Mar 3, 2020

@commy2
Copy link
Contributor

commy2 commented Mar 3, 2020

With only RHS and this script, if you throw the grenade against a wall right in front of you. What happens?

@severgun
Copy link
Contributor Author

severgun commented Mar 3, 2020

With regular throw it should disappear and deal 0.1 hit damage.
because first ammo is

explosionTime = -1;
explosionEffects = "";
hit = 0.1;
indirectHit = 0;

Can actually test it and record video later today

@commy2
Copy link
Contributor

commy2 commented Mar 3, 2020

How is that any different than with advanced throwing?

@severgun
Copy link
Contributor Author

severgun commented Mar 4, 2020

promised video https://www.youtube.com/watch?v=BVK088s7G0s&feature=youtu.be

How is that any different than with advanced throwing?

I think I already told what is different.

Regular:
Throw -> random delay 0.3-0.4 sec from rhs fired event -> Swap to parachuted -> Explode on hit.

Adv:
RHSFiredEvent -> CBA wait 0.3 sec -> Throw -> Swap to parachuted and explode in hands if random delay was close to 0.3. Because timer running out while grenade still in hands.

If random would be closer to 0.4 then you can throw grenade, but it will swap to parachuted and start decelerating almost immediately

@Mike-MF
Copy link
Member

Mike-MF commented Sep 11, 2023

Closing due to age, inactivity or already solved. May be re-opened if the issue is still present, even better just open a new up-to-date Issue.

@Mike-MF Mike-MF closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants