mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Fix some errors
This commit is contained in:
@@ -340,10 +340,21 @@ if !(DZE_ConfigTrader) then {
|
||||
|
||||
if (_hiveLoaded) then {
|
||||
// spawn_vehicles
|
||||
// Get all buildings and roads only once. Very taxing, but only on first startup
|
||||
buildingList = [];
|
||||
{
|
||||
if (DZE_MissionLootTable) then {
|
||||
if (isClass (missionConfigFile >> "CfgLoot" >> "Buildings" >> (typeOf _x))) then {buildingList set [count buildingList,_x];};
|
||||
} else {
|
||||
if (isClass (configFile >> "CfgLoot" >> "Buildings" >> (typeOf _x))) then {buildingList set [count buildingList,_x];};
|
||||
};
|
||||
} count (dayz_centerMarker nearObjects ["building",DynamicVehicleArea]);
|
||||
roadList = dayz_centerMarker nearRoads DynamicVehicleArea;
|
||||
|
||||
_vehLimit = MaxVehicleLimit - (count serverVehicleCounter);
|
||||
if (_vehLimit > 0) then {
|
||||
diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
|
||||
for "_x" from 1 to _vehLimit do {[] spawn spawn_vehicles;};
|
||||
for "_x" from 1 to _vehLimit do {spawn_vehicles_thread = [] spawn spawn_vehicles;};
|
||||
} else {
|
||||
diag_log "HIVE: Vehicle Spawn limit reached!";
|
||||
};
|
||||
@@ -358,12 +369,16 @@ for "_x" from 1 to MaxAmmoBoxes do {[] spawn spawn_ammosupply;};
|
||||
diag_log ("HIVE: Spawning # of Veins: " + str(MaxMineVeins));
|
||||
for "_x" from 1 to MaxMineVeins do {[] spawn spawn_mineveins;};
|
||||
|
||||
// All done spawning stuff, can clear these now
|
||||
buildingList = []; roadList = [];
|
||||
|
||||
[] spawn server_spawnEvents;
|
||||
_debugMarkerPosition = getMarkerPos "respawn_west";
|
||||
_debugMarkerPosition = [(_debugMarkerPosition select 0),(_debugMarkerPosition select 1),1];
|
||||
_vehicle_0 = createVehicle ["DebugBox_DZ", _debugMarkerPosition, [], 0, "CAN_COLLIDE"];
|
||||
_vehicle_0 setPos _debugMarkerPosition;
|
||||
_vehicle_0 setVariable ["ObjectID","1",true];
|
||||
_vehicle_0 setVariable ["ObjectID","1",true];
|
||||
|
||||
[] spawn {
|
||||
waitUntil {uiSleep 5;(scriptDone spawn_vehicles_thread)};
|
||||
// All done spawning stuff, can clear these now
|
||||
buildingList = nil; roadList = nil;
|
||||
diag_log "All vehicle spawning threads completed";
|
||||
};
|
||||
Reference in New Issue
Block a user