From 086c9ed71ead08bcef179c14d16900775811284b Mon Sep 17 00:00:00 2001 From: zgmrvn Date: Sun, 18 Jun 2017 14:18:47 +0200 Subject: [PATCH] buildingsOccupation - suppression des groupes lorsque vide --- .../functions/fn_buildingsOccupation_occupation.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/@corp_edition/addons/corp_edition_buildings_occupation/functions/fn_buildingsOccupation_occupation.sqf b/@corp_edition/addons/corp_edition_buildings_occupation/functions/fn_buildingsOccupation_occupation.sqf index 068dc60..b84174f 100644 --- a/@corp_edition/addons/corp_edition_buildings_occupation/functions/fn_buildingsOccupation_occupation.sqf +++ b/@corp_edition/addons/corp_edition_buildings_occupation/functions/fn_buildingsOccupation_occupation.sqf @@ -46,6 +46,7 @@ for [{private _i = 0}, {(_i < _unitsCount) && {_i < _positionsCount}}, {_i = _i private _dir = _position select 2; private _group = createGroup _side; + _group deleteGroupWhenEmpty true; private _wp = _group addWaypoint [_pos, 0]; deleteWaypoint [_group, (count (waypoints _group)) - 1]; private _unit = _group createUnit [selectRandom _units, _building modelToWorld _pos, [], 0, "CAN_COLLIDE"];