Skip to content

Commit

Permalink
Merge pull request #172 from Vdauphin/FIX-database_veh_spawn
Browse files Browse the repository at this point in the history
FIX: Vehicle load by database spawn stuck in ground
  • Loading branch information
Vdauphin authored Jul 23, 2016
2 parents cdd7107 + 87d53b8 commit 4e7723b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion =BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

private ["_p_db","_p_en","_hideout_n","_cache_info_def","_cache_info_ratio","_info_chance","_p_rep","_p_skill","_c_array","_tower","_array","_chopper","_p_civ","_btc_rearming_vehicles","_vehicles","_magazines","_p_city_radius"];

btc_version = 1.14; diag_log format ["=BTC= HEARTS AND MINDS VERSION %1",(str(btc_version) + ".1")];
btc_version = 1.14; diag_log format ["=BTC= HEARTS AND MINDS VERSION %1",(str(btc_version) + ".2")];

//Param
btc_p_time = (paramsArray select 0);
Expand Down
2 changes: 1 addition & 1 deletion =BTC=co@30_Hearts_and_Minds.Altis/core/doc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,6 @@ Use ACE 3 interactions system.

player createDiaryRecord ["Documentation", [
"Version",
format ["Version %1",(str(btc_version) + ".1")]
format ["Version %1",(str(btc_version) + ".2")]
]
];
7 changes: 4 additions & 3 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ diag_log format ["5: %1",(_x select 5)];
_veh = (_x select 0) createVehicle (_x select 1);
_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];
Expand All @@ -215,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;
Expand Down Expand Up @@ -278,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);
Expand All @@ -296,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;
Expand Down
2 changes: 1 addition & 1 deletion =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/save.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4e7723b

Please sign in to comment.