Jerry Can - only set global var on server (#5131)

This commit is contained in:
PabstMirror 2017-05-10 13:13:15 -05:00 committed by GitHub
parent 7c7d779250
commit 12f42ab39a

View File

@ -22,7 +22,9 @@ if (isNull _target ||
{_target isKindOf "AllVehicles"} ||
{_target getVariable [QGVAR(jerryCan), false]}) exitWith {};
[_target, _fuelAmount] call FUNC(setFuel);
if (isServer) then {
[_target, _fuelAmount] call FUNC(setFuel); // has global effects
};
_target setVariable [QGVAR(jerryCan), true];
_target setVariable [QGVAR(source), _target];