ACE3
ACE3 copied to clipboard
Cookoff - Mini-Rewrite
When merged this pull request will:
- Fixes #8736.
- Fixes #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 thatGVAR(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.
- This setting was too ambiguous in my opinion. 3 separate settings exist (
-
GVAR(enableFire)
is now the sole setting that handles vehicle cook-off fire. This setting does not handle ammo detonation (handled byGVAR(enableAmmoCookoff)
). - Added a duration coefficient setting
GVAR(cookoffDuration)
for cook-off (fixes #9743). -
GVAR(probabilityCoef)
has been made useful again. It's only used in theadvanced vehicle damage
component. - Moved
GVAR(removeAmmoDuringCookoff)
fromvehicle_damage
intocookoff
. 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}
.
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.
This or #5327 first for review?
This or #5327 first for review?
#5327 should probably be first, although that means I need to include the changes I mentioned above.
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.
This is fully ready to review.
I'll hold off from merging until #9061 is merged.
@johnb432 merge conflicts
@johnb432 merge conflicts
I need to still resolve some stuff, so hold off from merging, I'll handle it.
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