From f9d1a39adf376b16783029b36b249ca0d9b7c8c3 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Mon, 8 Jun 2015 18:18:40 +0100 Subject: [PATCH] Updated edited BI functions with 1.46 changes --- .../zeus/functions/fnc_bi_moduleCurator.sqf | 28 +++++++++++-------- addons/zeus/functions/fnc_bi_moduleMine.sqf | 2 +- .../functions/fnc_bi_moduleProjectile.sqf | 4 +-- .../functions/fnc_bi_moduleRemoteControl.sqf | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index b33d7461cd..2d41a725cb 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -126,13 +126,14 @@ if (_activated) then { case (_ownerUID > 0): { waituntil { sleep 0.01; - {getplayeruid _x == _ownerVar} count playableunits > 0 + {getplayeruid _x == _ownerVar} count playableunits > 0 || isnull _logic }; }; default { - waituntil {isplayer (missionnamespace getvariable [_ownerVar,objnull])}; + waituntil {isplayer (missionnamespace getvariable [_ownerVar,objnull]) || isnull _logic}; }; }; + if (isnull _logic) exitwith {}; //--- Assign _player = objnull; @@ -147,21 +148,22 @@ if (_activated) then { }; }; - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic)}; - waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player}; + waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; + waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic}; + if (isnull _logic) exitwith {}; //--- Add radio channels { _x radiochanneladd [_player]; } foreach (_logic getvariable ["channels",[]]); - // Added by ACE_zeus to delay ascension message at mission start + // Added by ace_zeus to delay ascension message at mission start [{ _logic = _this select 0; _player = _this select 1; - if (GVAR(zeusAscension)) then { - //--- Sent notification to all assigned players + //--- Sent notification to all assigned players + if ((_logic getvariable ["showNotification",true]) && GVAR(zeusAscension)) then { { if (isplayer _x) then { [["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp; @@ -172,7 +174,7 @@ if (_activated) then { [_logic,"curatorUnitAssigned",[_logic,_player]] call bis_fnc_callscriptedeventhandler; - // Added by ACE_zeus + // Added by ace_zeus ["zeusUnitAssigned", [_logic,_player]] call EFUNC(common,globalEvent); //--- Forced interface @@ -185,13 +187,14 @@ if (_activated) then { case (_ownerUID > 0): { waituntil { sleep 0.01; - {getplayeruid _x == _ownerVar} count playableunits == 0 + {getplayeruid _x == _ownerVar} count playableunits == 0 || isnull _logic }; }; default { - waituntil {_player != missionnamespace getvariable [_ownerVar,objnull]}; + waituntil {_player != missionnamespace getvariable [_ownerVar,objnull] || isnull _logic}; }; }; + if (isnull _logic) exitwith {}; //--- Add radio channels { @@ -199,7 +202,8 @@ if (_activated) then { } foreach (_logic getvariable ["channels",[]]); //--- Unassign - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic)}; + waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; + if (isnull _logic) exitwith {}; }; }; @@ -218,7 +222,7 @@ if (_activated) then { } foreach (synchronizedobjects _logic); _addons call bis_fnc_activateaddons; - // Added by ACE_zeus to delay bird code + // Added by ace_zeus to delay bird code [{ _logic = _this select 0; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 5eade0e0b4..8f60531b34 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -26,7 +26,7 @@ if (_activated) then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; - // Added by ACE_zeus to control if mines are revealed + // Added by ace_zeus to control if mines are revealed if (GVAR(revealMines) > 0) then { //--- Reveal the mine to curator's side { diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 3237d5be73..5980e56b3d 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -127,7 +127,7 @@ if (_activated) then { _projectile setvelocity _velocity; if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];}; - // This is our addition to this function + // Added by ace_zeus for ace_frag compatibility if (!isnil "ace_frag_fnc_addManualTrack") then { [_projectile] call ace_frag_fnc_addManualTrack }; @@ -138,7 +138,7 @@ if (_activated) then { //--- Create sound source _soundSource = if (_soundSourceClass != "") then {createSoundSource [_soundSourceClass,_pos,[],0]} else {objnull}; - // Added by ACE_zeus to toggle ordnance radio message + // Added by ace_zeus to toggle ordnance radio message if (GVAR(radioOrdnance)) then { //--- Play radio warning [] call _fnc_playRadio; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 92cc786b23..a9e1f35080 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -49,7 +49,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { bis_fnc_moduleRemoteControl_unit = _unit; _unit setvariable ["bis_fnc_moduleRemoteControl_owner",player,true]; - // Added by ACE_zeus to toggle remote control wind sound + // Added by ace_zeus to toggle remote control wind sound if (GVAR(remoteWind)) then { //--- Play wind cue to all players [format ["wind%1",ceil random 5],"bis_fnc_playsound"] call bis_fnc_mp;