From 2334d501d01ace9643c5abea27fbb3d29382b1ee Mon Sep 17 00:00:00 2001 From: commy2 Date: Tue, 14 Mar 2017 10:04:56 +0100 Subject: [PATCH 1/2] Fix cookoff desynch, fix #4900 Randomness would be calculated on every machine, but only vehicle explosion and sound are done by the server. Smoke, light and fire sfx are done by each client. --- addons/cookoff/functions/fnc_cookOff.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/cookoff/functions/fnc_cookOff.sqf b/addons/cookoff/functions/fnc_cookOff.sqf index 7ae36670ac..b75eaf9eb3 100644 --- a/addons/cookoff/functions/fnc_cookOff.sqf +++ b/addons/cookoff/functions/fnc_cookOff.sqf @@ -132,6 +132,6 @@ if (local _vehicle) then { if (local _vehicle) then { _vehicle setDamage 1; }; - }, [_vehicle, _effects], 4 + random 20] call CBA_fnc_waitAndExecute; - }, [_vehicle, _effects, _positions], 3 + random 15] call CBA_fnc_waitAndExecute; -}, _vehicle, 0.5 + random 5] call CBA_fnc_waitAndExecute; + }, [_vehicle, _effects], 14] call CBA_fnc_waitAndExecute; + }, [_vehicle, _effects, _positions], 10.5] call CBA_fnc_waitAndExecute; +}, _vehicle, 3] call CBA_fnc_waitAndExecute; From 2c4f286593ea1b04ce56d9e81ae1046a8709acf1 Mon Sep 17 00:00:00 2001 From: commy2 Date: Tue, 14 Mar 2017 10:08:06 +0100 Subject: [PATCH 2/2] also fix cooking off ammo boxes --- addons/cookoff/functions/fnc_cookOffBox.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/cookoff/functions/fnc_cookOffBox.sqf b/addons/cookoff/functions/fnc_cookOffBox.sqf index f944d917e8..6f834a15b6 100644 --- a/addons/cookoff/functions/fnc_cookOffBox.sqf +++ b/addons/cookoff/functions/fnc_cookOffBox.sqf @@ -71,6 +71,6 @@ if (local _box) then { if (local _box) then { _box setDamage 1; }; - }, [_box, _effects], 45 + random 75] call CBA_fnc_waitAndExecute; // Give signifcant time for ammo cookoff to occur (perhaps keep the box alive until all cooked off?) - }, [_box, _effects], 3 + random 15] call CBA_fnc_waitAndExecute; -}, _box, 0.5 + random 5] call CBA_fnc_waitAndExecute; + }, [_box, _effects], 82.5] call CBA_fnc_waitAndExecute; // Give signifcant time for ammo cookoff to occur (perhaps keep the box alive until all cooked off?) + }, [_box, _effects], 10.5] call CBA_fnc_waitAndExecute; +}, _box, 3] call CBA_fnc_waitAndExecute;