mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-05-20 01:23:20 +03:00
Fix Now the new Object Streaming way + much better performance
This commit is contained in:
@@ -52,29 +52,27 @@ if (isServer and isNil "sm_done") then {
|
||||
|
||||
_BuildingQueue = [];
|
||||
_objectQueue = [];
|
||||
_finalEpochObjArray = [];
|
||||
|
||||
if ((_hiveResponse select 0) == "ObjectStreamStart") then {
|
||||
diag_log ("HIVE: Commence Object Streaming...");
|
||||
_objectCount = _hiveResponse select 1;
|
||||
_key = format["CHILD:302:%1:", dayZ_instance];
|
||||
_objectCount = _hiveResponse select 1;
|
||||
for "_i" from 1 to _objectCount do {
|
||||
_hiveResponse = _key call server_hiveReadWriteLarge;
|
||||
//diag_log (format["HIVE dbg %1 %2", typeName _hiveResponse, _hiveResponse]);
|
||||
|
||||
if (((_hiveResponse select _i) select 2) isKindOf "ModularItems") then {
|
||||
if ((_hiveResponse select 2) isKindOf "ModularItems") then {
|
||||
_BuildingQueue set [(count _BuildingQueue),_hiveResponse];
|
||||
} else {
|
||||
_objectQueue set [(count _objectQueue),_hiveResponse];
|
||||
};
|
||||
diag_log ("HIVE: got " + str(_BuildingQueue) + " Epoch objects and" + str(_objectQueue) + " Vehicles");
|
||||
};
|
||||
};
|
||||
diag_log ("HIVE: got " + str(count(_BuildingQueue)) + " Epoch Objects and " + str(count(_objectQueue)) + " Vehicles");
|
||||
|
||||
_spawnSort = [_BuildingQueue,_objectQueue]; // Put arrays in order that you wish them to spawn
|
||||
|
||||
_finalEpochObjArray = _BuildingQueue + _objectQueue;
|
||||
// # NOW SPAWN OBJECTS #
|
||||
_totalvehicles = 0;
|
||||
{
|
||||
{
|
||||
_idKey = _x select 1;
|
||||
_type = _x select 2;
|
||||
@@ -250,8 +248,7 @@ if (isServer and isNil "sm_done") then {
|
||||
//Monitor the object
|
||||
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
|
||||
};
|
||||
} forEach _x;
|
||||
} forEach _spawnSort;
|
||||
} forEach _finalEpochObjArray;
|
||||
|
||||
// # END SPAWN OBJECTS #
|
||||
|
||||
|
||||
Reference in New Issue
Block a user