mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added incendiary rounds as source of box cookoff
This commit is contained in:
parent
e541b337c5
commit
0663bd16c9
@ -29,8 +29,10 @@ if !(_box getVariable [QGVAR(enableAmmoCookoff), true]) exitWith {};
|
||||
|
||||
if !(_hitPoint == "" && {_damage > 0.5}) exitWith {}; // "" means structural damage
|
||||
|
||||
// Catch fire when hit by an explosive round
|
||||
if (IS_EXPLOSIVE_AMMO(_ammo)) then {
|
||||
private _ammoConfig = _ammo call CBA_fnc_getObjectConfig;
|
||||
|
||||
// Catch fire when hit by an explosive or incendiary round
|
||||
if ((getNumber (_ammoConfig >> "explosive") >= 0.5) || {getNumber (_ammoConfig >> QEGVAR(vehicle_damage,incendiary)) > random 1}) then {
|
||||
[QGVAR(cookOffBox), [_box, _source, _instigator]] call CBA_fnc_serverEvent;
|
||||
} else {
|
||||
// There is a small chance of cooking a box off if it's shot by tracer ammo
|
||||
|
@ -16,10 +16,8 @@
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define IS_EXPLOSIVE_AMMO(ammo) (getNumber (ammo call CBA_fnc_getObjectConfig >> "explosive") > 0.5)
|
||||
|
||||
// Stages of cookoff in order (in seconds)
|
||||
// Should be no un-synced randomness in these as the effects must be ran on each client
|
||||
// Should be no un-synced randomness in these as the effects must be run on each client
|
||||
#define SMOKE_DELAY 10.5
|
||||
#define DETONATION_DELAY 3
|
||||
#define COOKOFF_TIME 14 // Cook off time should be 20s at most due to length of sound files
|
||||
|
Loading…
Reference in New Issue
Block a user