diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 5750ab52d6..7d145c8421 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -66,7 +66,7 @@ class CfgVehicles { }; class ModuleCurator_F: Module_F { - function = QUOTE(DFUNC(moduleCuratorDelay)); + function = QUOTE(DFUNC(bi_moduleCurator)); }; class ModuleMine_F: ModuleEmpty_F { function = QUOTE(DFUNC(bi_moduleMine)); diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index 9ae35a4ce4..6011480da7 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -152,16 +152,6 @@ if (_activated) then { _x radiochanneladd [_player]; } foreach (_logic getvariable ["channels",[]]); - // Added by ACE_zeus to toggle ascension messages - if (GVAR(zeusAscension)) then { - //--- Sent notification to all assigned players - { - if (isplayer _x) then { - [["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp; - }; - } foreach (curatoreditableobjects _logic); - }; - [_logic,"curatorUnitAssigned",[_logic,_player]] call bis_fnc_callscriptedeventhandler; //--- Forced interface @@ -192,16 +182,6 @@ if (_activated) then { }; }; - // Added by ACE_zeus to toggle eagle - if (GVAR(zeusBird)) then { - //--- Create bird - _birdType = _logic getvariable ["birdType","eagle_f"]; - if (_birdType != "") then { - _bird = createvehicle [_birdType,[100,100,100],[],0,"none"]; - _logic setvariable ["bird",_bird,true]; - }; - }; - //--- Activated all future addons _addons = []; { @@ -217,18 +197,8 @@ if (_activated) then { } foreach (synchronizedobjects _logic); _addons call bis_fnc_activateaddons; - // Added by ACE_zeus to toggle eagle - if (GVAR(zeusBird)) then { - //--- Locality changed - _logic addeventhandler [ - "local", - { - _logic = _this select 0; - _bird = _logic getvariable ["bird",objnull]; - _bird setowner owner _logic; - } - ]; - }; + // Added by ACE_zeus to delay ascension messages and bird code (so that settings can be changed) + [{_this spawn DFUNC(moduleCuratorDelay);},_this] call EFUNC(common,execNextFrame); }; //--- Player diff --git a/addons/zeus/functions/fnc_moduleCuratorDelay.sqf b/addons/zeus/functions/fnc_moduleCuratorDelay.sqf index 734cf1a999..9394ab04e6 100644 --- a/addons/zeus/functions/fnc_moduleCuratorDelay.sqf +++ b/addons/zeus/functions/fnc_moduleCuratorDelay.sqf @@ -1,6 +1,6 @@ /* * Author: SilentSpike - * Function that delays the execution of the curator module function + * Function executed at a delay to allow curator settings module to run first * Allows ascension and bird settings to be set by module beforehand * * Arguments: @@ -16,4 +16,34 @@ #include "script_component.hpp" -[{_this spawn DFUNC(bi_moduleCurator);},_this] call EFUNC(common,execNextFrame); +if (isServer) then { + // Extracted from moduleCurator to toggle ascension messages + if (GVAR(zeusAscension)) then { + //--- Sent notification to all assigned players + { + if (isplayer _x) then { + [["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp; + }; + } foreach (curatoreditableobjects _logic); + }; + + // Extracted from moduleCurator to toggle eagle + if (GVAR(zeusBird)) then { + //--- Create bird + _birdType = _logic getvariable ["birdType","eagle_f"]; + if (_birdType != "") then { + _bird = createvehicle [_birdType,[100,100,100],[],0,"none"]; + _logic setvariable ["bird",_bird,true]; + }; + + //--- Locality changed + _logic addeventhandler [ + "local", + { + _logic = _this select 0; + _bird = _logic getvariable ["bird",objnull]; + _bird setowner owner _logic; + } + ]; + }; +}; \ No newline at end of file