mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
998f86f034
* first pass * second pass * third pass * final pass * missing commas * newlines * switch to cba eventhandler * newlines, formatting * laser - movedToSQF * add logging to ace_common_fnc_cbaSettings_loadFromConfig * Update initSettings.sqf Co-authored-by: PabstMirror <pabstmirror@gmail.com>
37 lines
786 B
Plaintext
37 lines
786 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: bux578
|
|
* Initializes the SwitchUnits pbo.
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* None
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
|
|
if (missionNamespace getVariable [QGVAR(EnableSwitchUnits), false]) then {
|
|
[player] call FUNC(startSwitchUnits);
|
|
} else {
|
|
["CBA_SettingChanged", {
|
|
params ["_name", "_value"];
|
|
if ((_name == QGVAR(EnableSwitchUnits)) && {_value}) then {
|
|
[player] call FUNC(startSwitchUnits);
|
|
};
|
|
}] call CBA_fnc_addEventHandler;
|
|
};
|
|
|
|
if (isServer) then {
|
|
[QGVAR(switchLocality), {
|
|
params ["_unit", "_player"];
|
|
_unit setVariable [QGVAR(OriginalOwner), owner _unit, true];
|
|
_unit setOwner (owner _player);
|
|
}] call CBA_fnc_addEventHandler;
|
|
};
|