mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 13:26:39 +03:00
buildings before cars
This commit is contained in:
@@ -62,9 +62,11 @@ if (isServer and isNil "sm_done") then {
|
|||||||
diag_log ("HIVE: got " + str(count _objectArray) + " objects");
|
diag_log ("HIVE: got " + str(count _objectArray) + " objects");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dayz_BuildingQueue = [];
|
||||||
|
dayz_objectQueue = [];
|
||||||
|
|
||||||
// # START OF STREAMING #
|
// # START OF STREAMING #
|
||||||
_countr = 0;
|
_countr = 0;
|
||||||
_totalvehicles = 0;
|
|
||||||
{
|
{
|
||||||
//Parse Array
|
//Parse Array
|
||||||
_countr = _countr + 1;
|
_countr = _countr + 1;
|
||||||
@@ -79,6 +81,35 @@ if (isServer and isNil "sm_done") then {
|
|||||||
_fuel = _x select 7;
|
_fuel = _x select 7;
|
||||||
_damage = _x select 8;
|
_damage = _x select 8;
|
||||||
|
|
||||||
|
_objArray = [_countr,_idKey,_type,_ownerID,_worldspace,_intentory,_hitPoints,_fuel,_damage];
|
||||||
|
|
||||||
|
switch true do {
|
||||||
|
case (_type isKindOf "ModularItems"): {
|
||||||
|
dayz_BuildingQueue set [(count dayz_BuildingQueue),_objArray];
|
||||||
|
};
|
||||||
|
default {
|
||||||
|
dayz_objectQueue set [(count dayz_objectQueue),_objArray];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _objectArray;
|
||||||
|
// # END OF STREAMING #
|
||||||
|
|
||||||
|
// # NOW SPAWN OBJECTS #
|
||||||
|
_totalvehicles = 0;
|
||||||
|
{
|
||||||
|
_ObjArray = _x;
|
||||||
|
|
||||||
|
{
|
||||||
|
_idKey = _x select 1;
|
||||||
|
_type = _x select 2;
|
||||||
|
_ownerID = _x select 3;
|
||||||
|
|
||||||
|
_worldspace = _x select 4;
|
||||||
|
_intentory= _x select 5;
|
||||||
|
_hitPoints= _x select 6;
|
||||||
|
_fuel = _x select 7;
|
||||||
|
_damage = _x select 8;
|
||||||
|
|
||||||
_dir = 0;
|
_dir = 0;
|
||||||
_pos = [0,0,0];
|
_pos = [0,0,0];
|
||||||
_wsDone = false;
|
_wsDone = false;
|
||||||
@@ -90,6 +121,7 @@ if (isServer and isNil "sm_done") then {
|
|||||||
_wsDone = true;
|
_wsDone = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!_wsDone) then {
|
if (!_wsDone) then {
|
||||||
if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
|
if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
|
||||||
_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
|
_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
|
||||||
@@ -97,6 +129,7 @@ if (isServer and isNil "sm_done") then {
|
|||||||
diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
|
diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if (_damage < 1) then {
|
if (_damage < 1) then {
|
||||||
//diag_log format["OBJ: %1 - %2", _idKey,_type];
|
//diag_log format["OBJ: %1 - %2", _idKey,_type];
|
||||||
|
|
||||||
@@ -241,8 +274,13 @@ if (isServer and isNil "sm_done") then {
|
|||||||
//Monitor the object
|
//Monitor the object
|
||||||
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
|
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
|
||||||
};
|
};
|
||||||
} forEach _objectArray;
|
} forEach _ObjArray;
|
||||||
// # END OF STREAMING #
|
} forEach [dayz_BuildingQueue,dayz_objectQueue]; // Put arrays in order that you wish them to spawn
|
||||||
|
|
||||||
|
dayz_BuildingQueue = nil;
|
||||||
|
dayz_objectQueue = nil;
|
||||||
|
|
||||||
|
// # END SPAWN OBJECTS #
|
||||||
|
|
||||||
|
|
||||||
// preload server traders menu data into cache
|
// preload server traders menu data into cache
|
||||||
|
|||||||
Reference in New Issue
Block a user