diff --git a/addons/civ_placement/fnc_CP.sqf b/addons/civ_placement/fnc_CP.sqf index 050b0578d..8fb55619d 100644 --- a/addons/civ_placement/fnc_CP.sqf +++ b/addons/civ_placement/fnc_CP.sqf @@ -1058,19 +1058,18 @@ switch(_operation) do { // DEBUG ------------------------------------------------------------------------------------- private _guardRadius = parseNumber([_logic, "guardRadius"] call MAINCLASS); - private _guardPatrolPercentage = parseNumber([_logic, "guardPatrolPercentage"] call MAINCLASS); - - - + private _guardPatrolPercentage = parseNumber([_logic, "guardPatrolPercentage"] call MAINCLASS); + private _guardDistance = _size; + if(count _infantryGroups > 0 && _guardProbabilityCount > 0) then { for "_i" from 0 to _guardProbabilityCount -1 do { _guardGroup = (selectRandom _infantryGroups); - _guards = [_guardGroup, [_center, 50] call CBA_fnc_RandPos, random(360), true, _faction] call ALIVE_fnc_createProfilesFromGroupConfig; + _guards = [_guardGroup, [_center, _guardDistance] call CBA_fnc_RandPos, random(360), true, _faction] call ALIVE_fnc_createProfilesFromGroupConfig; // DEBUG ------------------------------------------------------------------------------------- if(_debug) then { - ["CP [%1] - Placing Garrison Guards - %1", _faction, _guardGroup] call ALiVE_fnc_dump; + ["CP [%1] - Placing Garrison Guards - %2", _faction, _guardGroup] call ALiVE_fnc_dump; }; // DEBUG ------------------------------------------------------------------------------------- diff --git a/addons/mil_placement/fnc_MP.sqf b/addons/mil_placement/fnc_MP.sqf index 58976bd25..f47b6bb70 100644 --- a/addons/mil_placement/fnc_MP.sqf +++ b/addons/mil_placement/fnc_MP.sqf @@ -1510,16 +1510,17 @@ switch(_operation) do { private _guardRadius = parseNumber([_logic, "guardRadius"] call MAINCLASS); private _guardPatrolPercentage = parseNumber([_logic, "guardPatrolPercentage"] call MAINCLASS); - + private _guardDistance = _size; + if(count _infantryGroups > 0 && _guardProbabilityCount > 0) then { for "_i" from 0 to _guardProbabilityCount -1 do { _guardGroup = (selectRandom _infantryGroups); - _guards = [_guardGroup, [_center, 50] call CBA_fnc_RandPos, random(360), true, _faction] call ALIVE_fnc_createProfilesFromGroupConfig; + _guards = [_guardGroup, [_center, _guardDistance] call CBA_fnc_RandPos, random(360), true, _faction] call ALIVE_fnc_createProfilesFromGroupConfig; // DEBUG ------------------------------------------------------------------------------------- if(_debug) then { - ["MP [%1] - Placing Garrison Guards - %1", _faction, _guardGroup] call ALiVE_fnc_dump; + ["MP [%1] - Placing Garrison Guards - %2", _faction, _guardGroup] call ALiVE_fnc_dump; }; // DEBUG ------------------------------------------------------------------------------------- diff --git a/addons/mil_placement_custom/fnc_CMP.sqf b/addons/mil_placement_custom/fnc_CMP.sqf index 330358c56..cbd080b55 100644 --- a/addons/mil_placement_custom/fnc_CMP.sqf +++ b/addons/mil_placement_custom/fnc_CMP.sqf @@ -569,7 +569,8 @@ switch(_operation) do { private _guardRadius = parseNumber([_logic, "guardRadius"] call MAINCLASS); private _guardPatrolPercentage = parseNumber([_logic, "guardPatrolPercentage"] call MAINCLASS); - + private _guardDistance = parseNumber([_logic, "size"] call MAINCLASS); + // Position and create groups private _groupCount = count _groups; private _totalCount = 0; @@ -587,11 +588,11 @@ switch(_operation) do { if (_i == 0 && {count _infantryGroups > 0} && _guardProbabilityCount > 0) then { _guardGroup = (selectRandom _infantryGroups); - _guards = [_guardGroup, [_position, 50] call CBA_fnc_RandPos, random(360), true, _faction] call ALIVE_fnc_createProfilesFromGroupConfig; + _guards = [_guardGroup, [_position, _guardDistance] call CBA_fnc_RandPos, random(360), true, _faction] call ALIVE_fnc_createProfilesFromGroupConfig; // DEBUG ------------------------------------------------------------------------------------- if(_debug) then { - ["CMP [%1] - Placing Garrison Guards - %1", _faction, _guardGroup] call ALiVE_fnc_dump; + ["CMP [%1] - Placing Garrison Guards - %2", _faction, _guardGroup] call ALiVE_fnc_dump; }; // DEBUG -------------------------------------------------------------------------------------