mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Vehicle Load Logs
- Prevent spam for reserved slots - Add free Slots to log
This commit is contained in:
parent
4cc121d69e
commit
3f3f1b220f
@ -13,7 +13,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_actualHitpoints","_allHitpoints","_allVehicles","_allowDamage","_arr","_arrNum","_availableColorsConfig","_cfgEpochVehicles","_check","_class","_colors","_count","_dataFormat","_dataFormatCount","_diag","_disableVehicleTIE","_dmg","_found","_immuneIfStartInBase","_jammerOwner","_jammers","_location","_lockedOwner","_marker","_nearestJammer","_removemagazinesturret","_removeweapons","_response","_selections","_serverSettingsConfig","_textureSelectionIndex","_textures","_vehHiveKey","_vehLockHiveKey","_vehicle","_vehicleDynamicSimulationSystem","_vehicleSlotIndex"];
|
||||
private ["_actualHitpoints","_allHitpoints","_allVehicles","_allowDamage","_arrNum","_availableColorsConfig","_cfgEpochVehicles","_check","_class","_colors","_count","_dataFormat","_dataFormatCount","_diag","_disableVehicleTIE","_dmg","_found","_immuneIfStartInBase","_jammerOwner","_jammers","_location","_lockedOwner","_marker","_nearestJammer","_removemagazinesturret","_removeweapons","_response","_selections","_serverSettingsConfig","_textureSelectionIndex","_textures","_vehHiveKey","_vehLockHiveKey","_vehicle","_vehicleDynamicSimulationSystem","_vehicleSlotIndex"];
|
||||
//[[[end]]]
|
||||
params [["_maxVehicleLimit",0]];
|
||||
|
||||
@ -35,10 +35,9 @@ for "_i" from 1 to _maxVehicleLimit do {
|
||||
_vehicleSlotIndex = EPOCH_VehicleSlots pushBack str(_i);
|
||||
|
||||
_vehHiveKey = format ["%1:%2", call EPOCH_fn_InstanceID,_i];
|
||||
_response = ["Vehicle", _vehHiveKey] call EPOCH_fnc_server_hiveGETRANGE;
|
||||
|
||||
if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
|
||||
_arr = _response select 1;
|
||||
(["Vehicle", _vehHiveKey] call EPOCH_fnc_server_hiveGETRANGE) params [["_status",0],["_arr",[]]];
|
||||
if (_arr isEqualTo []) exitwith {};
|
||||
if (_status isEqualTo 1 && _arr isEqualType []) then {
|
||||
_arrNum = count _arr;
|
||||
|
||||
// New Upgrade System adds to DB array, check and correct older saved vehicles
|
||||
@ -249,10 +248,10 @@ for "_i" from 1 to _maxVehicleLimit do {
|
||||
};
|
||||
};
|
||||
} else {
|
||||
diag_log format["DEBUG: invalid vehicle data: %1",_response];
|
||||
diag_log format["DEBUG: invalid vehicle data: %1 - %2",_status,_arr];
|
||||
};
|
||||
};
|
||||
// add all spawned vehicles to remains collector.
|
||||
addToRemainsCollector _allVehicles;
|
||||
diag_log format ["Epoch: Vehicle SPAWN TIMER %1, LOADED %2 VEHICLES", diag_tickTime - _diag, count _allVehicles];
|
||||
diag_log format ["Epoch: Loaded %1 Vehicles in %2 seconds - Free Slots: %3", count _allVehicles, diag_tickTime - _diag, _maxVehicleLimit - count _allVehicles];
|
||||
true
|
||||
|
Loading…
Reference in New Issue
Block a user