From 87d53b8ec687c895f793d5ef677a875d83a60102 Mon Sep 17 00:00:00 2001 From: Vdauphin Date: Sat, 23 Jul 2016 17:13:07 +0200 Subject: [PATCH] FIX: detect surface interception setvectorup can't be allways used because sometimes vehicle can be on an other object --- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf | 8 ++++---- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/save.sqf | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf index 2598ad6e8..7841f5d55 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf @@ -201,9 +201,9 @@ diag_log format ["5: %1",(_x select 5)]; { private ["_veh","_cont","_weap","_mags","_items"]; _veh = (_x select 0) createVehicle (_x select 1); - if ((_x select 1) select 2 < 0) then {(_x select 1) select 2 = 0}; _veh setPos (_x select 1); _veh setDir (_x select 2); + if ((getPos _veh) select 2 < 0) then {_veh setVectorUp surfaceNormal position _veh;}; _veh setFuel (_x select 3); _veh setDamage (_x select 4); _veh setVariable ["btc_dont_delete",true]; @@ -216,7 +216,7 @@ diag_log format ["5: %1",(_x select 5)]; _cargo_obj = _x select 2; _obj = _type createVehicle [0,0,0]; if ((_x select 1) != "") then {_obj setVariable ["ace_rearm_magazineClass",(_x select 1),true]}; - btc_log_obj_created = btc_log_obj_created + [_obj]; + btc_log_obj_created pushBack _obj; btc_curator addCuratorEditableObjects [[_obj], false]; clearWeaponCargoGlobal _obj;clearItemCargoGlobal _obj;clearMagazineCargoGlobal _obj; _weap_obj = _cargo_obj select 0; @@ -279,7 +279,7 @@ _objs = profileNamespace getVariable [format ["btc_hm_%1_objs",_name],[]]; { private ["_obj","_cont","_weap","_mags","_items"]; _obj = (_x select 0) createVehicle (_x select 1); - btc_log_obj_created = btc_log_obj_created + [_obj]; + btc_log_obj_created pushBack _obj; btc_curator addCuratorEditableObjects [[_obj], false]; _obj setDir (_x select 2); _obj setPosASL (_x select 1); @@ -297,7 +297,7 @@ _objs = profileNamespace getVariable [format ["btc_hm_%1_objs",_name],[]]; _cargo_obj = _x select 2; _l = _type createVehicle [0,0,0]; if ((_x select 1) != "") then {_l setVariable ["ace_rearm_magazineClass",(_x select 1),true]}; - btc_log_obj_created = btc_log_obj_created + [_l]; + btc_log_obj_created pushBack _l; btc_curator addCuratorEditableObjects [[_l], false]; clearWeaponCargoGlobal _l;clearItemCargoGlobal _l;clearMagazineCargoGlobal _l; _weap_obj = _cargo_obj select 0; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/save.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/save.sqf index a1a8e6dd2..6dcd1ba64 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/save.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/save.sqf @@ -71,7 +71,7 @@ _array_ho = []; _marker pushback (markerText _x); _ho_markers pushback _marker; } foreach (_x getVariable ["markers",[]]); - _data pushback (_ho_markers); + _data pushback _ho_markers; diag_log format ["HO %1 DATA %2",_x,_data]; _array_ho pushBack _data; } foreach btc_hideouts;