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

Cookoff - Mini-Rewrite #9758

Merged
merged 46 commits into from
Jun 5, 2024
Merged

Cookoff - Mini-Rewrite #9758

merged 46 commits into from
Jun 5, 2024

Conversation

johnb432
Copy link
Contributor

@johnb432 johnb432 commented Jan 27, 2024

When merged this pull request will:

  • Fixes Vehicles will only cook off once #8736.
  • Fixes Ace advanced vehicle damage / cookoff creates smoke pillar in wrong location #8683 by placing the smoke pillar on the engine selection.
  • To start vehicle or ammo box cook-offs, an event has to be run on the server.
  • Same goes for ammo cook-offs.
  • Made all effects JIP compatible (exception are the jet and ring effects, as they only last 20 seconds max).
  • Removed tiny explosion effects that were present in the smoke when an ammo box is cooking off, as it looks excessive when machine gun ammo is detonating. If projectiles are created during cook-off, they will ensure that such effects occur, but in a more suited manner to the cook-off happening.
  • Ammo boxes can now cook-off from incendiary rounds (incendiary definition comes from vehicle_damage).
  • Attached the cook-off sound to the vehicle, so that it moves with the vehicle.
  • Cook-off sound is deleted when the vehicle is deleted.
  • CBA settings have been reworked:
    • GVAR(enable) has been removed.
      • This setting was too ambiguous in my opinion. 3 separate settings exist (GVAR(enableFire), GVAR(enableAmmoCookoff) & GVAR(enableAmmobox)) that allow to control most aspects that GVAR(enable) does, making it redundant.
      • With the current system, if players dismount the vehicle that is going to cook off fast enough, the vehicle won't cook off. Checking for players within a vehicle is therefore pointless in my eyes.
      • This change means that setting QGVAR(enable) on objects will no longer affect ammo detonation, but only fire effects. QGVAR(enableAmmoCookoff) already exists and can be set in the editor, although that's currently not listed in the docs - that has been rectified.
    • GVAR(enableFire) is now the sole setting that handles vehicle cook-off fire. This setting does not handle ammo detonation (handled by GVAR(enableAmmoCookoff)).
    • Added a duration coefficient setting GVAR(cookoffDuration) for cook-off (fixes Cook off bug - vehicle never explodes, and cook off flame occurs multiple times. #9743).
    • GVAR(probabilityCoef) has been made useful again. It's only used in the advanced vehicle damage component.
    • Moved GVAR(removeAmmoDuringCookoff) from vehicle_damage into cookoff.
      Changed it so that it removes all magazines upon ammunition cook-off.
  • Code cleanup.

SP and MP testing has been conducted, but could use some more.

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@Drofseh
Copy link
Contributor

Drofseh commented Jan 28, 2024

Something that has always frustrated me about vehicle cookoff is how the ammo goes shooting out of the vehicle, sometimes landing 100m+ away from it. A round's propellant burning doesn't actually give it velocity unless it's contained by a barrel, it will just pop out of its casing, and ammo in storage shouldn't be exiting the vehicle at all.

@LinkIsGrim
Copy link
Contributor

This or #5327 first for review?

@johnb432
Copy link
Contributor Author

johnb432 commented Feb 2, 2024

This or #5327 first for review?

#5327 should probably be first, although that means I need to include the changes I mentioned above.

@johnb432
Copy link
Contributor Author

johnb432 commented Feb 2, 2024

This or #5327 first for review?

#5327 should probably be first, although that means I need to include the changes I mentioned above.

Done, #5327 is ready to review.

@johnb432
Copy link
Contributor Author

johnb432 commented Feb 5, 2024

This is fully ready to review.

@johnb432
Copy link
Contributor Author

johnb432 commented Apr 4, 2024

I'll hold off from merging until #9061 is merged.

@LinkIsGrim
Copy link
Contributor

@johnb432 merge conflicts

@johnb432
Copy link
Contributor Author

@johnb432 merge conflicts

I need to still resolve some stuff, so hold off from merging, I'll handle it.

@johnb432 johnb432 requested a review from LinkIsGrim May 26, 2024 07:49
@johnb432
Copy link
Contributor Author

I'm done with the changes. Those changes are:

  • redid internal events, so that API events wouldn't change
  • fixed some bugs that came with merging 9061

@johnb432 johnb432 merged commit c44a1e7 into acemod:master Jun 5, 2024
5 checks passed
@johnb432 johnb432 deleted the cookoff-refactor branch June 5, 2024 19:36
blake8090 pushed a commit to blake8090/ACE3 that referenced this pull request Aug 18, 2024
* Cook-off improvements

* More changes

* Update fnc_getVehicleAmmo.sqf

* Better engine fire placement

* Update fnc_detonateAmmunition.sqf

* Update XEH_postInit.sqf

* Update fnc_getVehicleAmmo.sqf

* Update events-framework.md

* Various improvements

* Separate effect handling

* Tweaks

* Update XEH_postInit.sqf

* Prevent double ammo detonation

* Fixed objects not being able to cook-off again

* Added incendiary rounds as source of box cookoff

* Converted enable setting to bool

* Fixed brackets

* Update fnc_cookOff.sqf

* Update CfgEden.hpp

* Removed GVAR(enable), added GVAR(enableFire) back

* Update initSettings.inc.sqf

* Update events-framework.md

* Update addons/cookoff/functions/fnc_cookOffEffect.sqf

* Restructured, redid API events

* Fix effect for JIP, minor optimisations

* Removed `cbaSettings_settingChanged`

* Renamed variables, tweaked string table entries

* Update fire damage acemod#9991

* Capitalize comments again

* Fix cookoff for very short durations and fix effect removal being too quick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
6 participants