Update server spawn_vehicles

Updated loot spawning code for vehicle cargo.

Also it is faster and more efficient to call spawn_vehicles repeatedly
in one thread rather than spawn it hundreds of times (opening hundreds
of simultaneous script threads).
This commit is contained in:
ebaydayz
2016-04-01 16:45:08 -04:00
parent 426e97dda7
commit ec4eb5418d
8 changed files with 61 additions and 95 deletions

View File

@@ -1,10 +1,8 @@
private ["_position","_veh","_istoomany"];
// do not make _roadList or _buildingList private in this function
waitUntil {!isNil "BIS_fnc_selectRandom"};
_position = roadList call BIS_fnc_selectRandom;
_position = _roadList call BIS_fnc_selectRandom;
_position = _position modelToWorld [0,0,0];
waitUntil {!isNil "BIS_fnc_findSafePos"};
_position = [_position,5,20,5,0,2000,0] call BIS_fnc_findSafePos;
if ((count _position) == 2) then {