From 2f8b4e4ac4d79baee20c29f5fc796ff198ae0c8d Mon Sep 17 00:00:00 2001 From: Vdauphin Date: Sun, 13 Aug 2017 18:21:08 +0200 Subject: [PATCH] FIX: inhouse units are not save correctly --- .../core/fnc/data/spawn_group.sqf | 3 ++- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/mil/addWP.sqf | 2 +- .../core/fnc/mil/create_group.sqf | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/data/spawn_group.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/data/spawn_group.sqf index 20e652599..f4b5d3d9b 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/data/spawn_group.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/data/spawn_group.sqf @@ -60,7 +60,8 @@ if (_type == 2) then { }; if (_type == 3) then { while {(count (waypoints _group)) > 0} do { deleteWaypoint ((waypoints _group) select 0); }; - [_group,_array_veh] spawn btc_fnc_house_addWP; + [_group, nearestObject[(units _group) select 0, _array_veh]] spawn btc_fnc_house_addWP; + _group setVariable ["inHouse", _array_veh]; }; if (_type == 4) then {[[0,0,0],0,units _group] spawn btc_fnc_civ_get_weapons;}; if (_type == 5) then { diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/mil/addWP.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/mil/addWP.sqf index 0b39e12c2..770b05d52 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/mil/addWP.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/mil/addWP.sqf @@ -27,7 +27,7 @@ switch (true) do { _in_house = true; _house = selectRandom _houses; [_group,_house] spawn btc_fnc_house_addWP; - _group setVariable ["inHouse",_house]; + _group setVariable ["inHouse", typeOf _house]; } else {[_group,_rpos,_area,"SAFE"] call btc_fnc_task_patrol;}; }; case (_wp > 0.3 && _wp < 0.75) : { diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/mil/create_group.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/mil/create_group.sqf index a7e467920..34fec4637 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/mil/create_group.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/mil/create_group.sqf @@ -38,7 +38,7 @@ switch (true) do { _in_house = true; _house = selectRandom _houses; [_group,_house] spawn btc_fnc_house_addWP; - _group setVariable ["inHouse",_house]; + _group setVariable ["inHouse", typeOf _house]; } else {[_group,_rpos,_area,"SAFE",_pos_iswater] spawn btc_fnc_task_patrol;}; }; case (_wp > 0.3 && _wp < 0.75) : {