Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Commit

Permalink
serverEvent not possible on server, use local
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Burkhardt committed May 30, 2018
1 parent da62038 commit 50a4198
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions [J]OPT.chernarus/cargo/functions/fnc_initCBAClassEvents.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,24 @@
["LandVehicle", "init", {
params ["_vec"];

[QGVAR(initCargo), [_vec]] call CBA_fnc_serverEvent; // global effect
if (local _vec) then {
[QGVAR(initCargo), [_vec]] call CBA_fnc_localEvent; // global effect
} else {
[QGVAR(initCargo), [_vec]] call CBA_fnc_serverEvent; // global effect
};

[_vec] call FUNC(initDragging);

}, nil, nil, true] call CBA_fnc_addClassEventHandler;

["Air", "init", {
params ["_vec"];

[QGVAR(initCargo), [_vec]] call CBA_fnc_serverEvent; // global effect
if (local _vec) then {
[QGVAR(initCargo), [_vec]] call CBA_fnc_localEvent; // global effect
} else {
[QGVAR(initCargo), [_vec]] call CBA_fnc_serverEvent; // global effect
};
[_vec] call FUNC(initDragging);

}, nil, nil, true] call CBA_fnc_addClassEventHandler;
Expand All @@ -45,7 +54,11 @@
["Thing", "init", {
params ["_item"];

[QGVAR(initCargo), [_vec]] call CBA_fnc_serverEvent; // global effect
if (local _vec) then {
[QGVAR(initCargo), [_vec]] call CBA_fnc_localEvent; // global effect
} else {
[QGVAR(initCargo), [_vec]] call CBA_fnc_serverEvent; // global effect
};
[_item] call FUNC(initDragging);

}, nil, nil, true] call CBA_fnc_addClassEventHandler;

0 comments on commit 50a4198

Please sign in to comment.