Skip to content

Commit

Permalink
Merge pull request #382 from Vdauphin/FIX-inhouse_not_save
Browse files Browse the repository at this point in the history
FIX: Units in house are not saved correctly
  • Loading branch information
Vdauphin authored Aug 14, 2017
2 parents c43b956 + 2f8b4e4 commit b099fa2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/mil/addWP.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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) : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) : {
Expand Down

0 comments on commit b099fa2

Please sign in to comment.