Skip to content

Commit

Permalink
Same SR frequencies per group should not override same SR for side
Browse files Browse the repository at this point in the history
  • Loading branch information
severgun authored and dedmen committed Oct 3, 2019
1 parent bb8f4e8 commit 2414062
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions addons/core/functions/server/fnc_serverInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,17 @@ GVAR(instanciationIsReady) = false;
VARIABLE_DEFAULT(TFAR_freq_sr_west,true call DFUNC(generateSRSettings));
VARIABLE_DEFAULT(TFAR_freq_sr_east,true call DFUNC(generateSRSettings));
VARIABLE_DEFAULT(TFAR_freq_sr_independent,true call DFUNC(generateSRSettings));
};

if (TFAR_SameSRFrequenciesPerGroup) then {
{
_x params ["_unit"];
private _frequencies = _unit getVariable ["TFAR_freq_sr", (group _unit) getVariable "TFAR_freq_sr"];
if (isNil "_frequencies") then {
_frequencies = [TFAR_MAX_CHANNELS, TFAR_MAX_SW_FREQ, TFAR_MIN_SW_FREQ, TFAR_FREQ_ROUND_POWER] call TFAR_fnc_generateFrequencies;
(group _unit) setVariable ["TFAR_freq_sr", _frequencies, true];
};
} forEach (playableUnits);
if (TFAR_SameSRFrequenciesPerGroup) then {
{
_x params ["_unit"];
private _frequencies = _unit getVariable ["TFAR_freq_sr", (group _unit) getVariable "TFAR_freq_sr"];
if (isNil "_frequencies") then {
_frequencies = [TFAR_MAX_CHANNELS, TFAR_MAX_SW_FREQ, TFAR_MIN_SW_FREQ, TFAR_FREQ_ROUND_POWER] call TFAR_fnc_generateFrequencies;
(group _unit) setVariable ["TFAR_freq_sr", _frequencies, true];
};
} forEach (playableUnits);
};
};

if (TFAR_SameLRFrequenciesForSide) then {
Expand Down

0 comments on commit 2414062

Please sign in to comment.