Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions addons/main/functions/fnc_findPosHouse.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ private _range = param [1,100,[0]];
private _return = [];

private _houseArray = _center nearObjects ["House",_range];
_houseArray = _houseArray select {!((_x buildingPos -1) isEqualTo []) && {!(typeOf _x in BAD_HOUSES)}};
_houseArray = _houseArray select {!((_x call BIS_fnc_buildingpositions) isEqualTo []) && {!(typeOf _x in BAD_HOUSES)}};

if !(_houseArray isEqualTo []) then {
private _house = selectRandom _houseArray;
private _housePosArray = _house buildingPos -1;
private _housePosArray = _house call BIS_fnc_buildingpositions;

{
if (_x call FUNC(inBuilding)) exitWith {
Expand All @@ -34,4 +34,4 @@ if !(_houseArray isEqualTo []) then {
} count _housePosArray;
};

_return
_return