diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server.pbo index 76d57f6b..f3376160 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo index 72fc69d3..0c4170c4 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo index bdd499e6..a2a5382f 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo differ diff --git a/Server_Install_Pack/@epochhive/epochconfig.hpp b/Server_Install_Pack/@epochhive/epochconfig.hpp index b70263a0..3e0b9573 100644 --- a/Server_Install_Pack/@epochhive/epochconfig.hpp +++ b/Server_Install_Pack/@epochhive/epochconfig.hpp @@ -57,3 +57,6 @@ hiveAsync = true; // true = asynchronous hive calls (non blocking), false = sync hiveAdminCmdExec = false; // true = enables extra (To Be Released) feature to allow execution of code via hive. hiveAdminSavePlayerList = true; // true = enables saving of playerUID array to hive value PLAYERS:#InstanceID. hiveAdminCmdTime = 5; // how many seconds between each command queue call. + +// DEBUG +useOldLoadVehicles = false; diff --git a/Server_Install_Pack/mpmissions/epoch.Altis.pbo b/Server_Install_Pack/mpmissions/epoch.Altis.pbo index 8c032325..407badf6 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Altis.pbo and b/Server_Install_Pack/mpmissions/epoch.Altis.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Australia.pbo b/Server_Install_Pack/mpmissions/epoch.Australia.pbo index 7a22a1a8..5b318bd0 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Australia.pbo and b/Server_Install_Pack/mpmissions/epoch.Australia.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo index e5d044bf..3a436a93 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo index 94703a4b..d0b9b14e 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo and b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo index 930fef8a..bb4325b2 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo and b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo index 5e6d6728..b5511701 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo and b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo index ad11bfdb..60c74598 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo and b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo index 832d7df1..a4698f63 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo and b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo index 9d6050f0..21168165 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Napf.pbo b/Server_Install_Pack/mpmissions/epoch.Napf.pbo index 6c87908f..ba2ca31e 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Napf.pbo and b/Server_Install_Pack/mpmissions/epoch.Napf.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Porto.pbo b/Server_Install_Pack/mpmissions/epoch.Porto.pbo index bd1adabc..dfe1ceaf 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Porto.pbo and b/Server_Install_Pack/mpmissions/epoch.Porto.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo index 754f7629..cf679cd6 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo and b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Sara.pbo b/Server_Install_Pack/mpmissions/epoch.Sara.pbo index c041925e..fcfe5d4a 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Sara.pbo and b/Server_Install_Pack/mpmissions/epoch.Sara.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo index f43882e9..a75e7cd5 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo and b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo index b6702149..a5eec5cd 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo and b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo index 78c8e8fa..548f26d8 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo and b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo index d5d7f868..7500c80b 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo and b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo index 32b6724f..945651ec 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo and b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo b/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo index 0e27c226..057ef4e5 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo and b/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.VR.pbo b/Server_Install_Pack/mpmissions/epoch.VR.pbo index 31b97872..5812f18f 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.VR.pbo and b/Server_Install_Pack/mpmissions/epoch.VR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo index d08b5eb6..7341485e 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo index 3101783c..f1a73df9 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo and b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.utes.pbo b/Server_Install_Pack/mpmissions/epoch.utes.pbo index 5e15f2fa..130cb3d1 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.utes.pbo and b/Server_Install_Pack/mpmissions/epoch.utes.pbo differ diff --git a/Sources/epoch_config/build.hpp b/Sources/epoch_config/build.hpp index 5db56ac3..52e5377b 100644 --- a/Sources/epoch_config/build.hpp +++ b/Sources/epoch_config/build.hpp @@ -1 +1 @@ -build=561; +build=562; diff --git a/Sources/epoch_server/build.hpp b/Sources/epoch_server/build.hpp index 5db56ac3..52e5377b 100644 --- a/Sources/epoch_server/build.hpp +++ b/Sources/epoch_server/build.hpp @@ -1 +1 @@ -build=561; +build=562; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf index 6b49f1d1..323a56b4 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf @@ -62,7 +62,7 @@ for "_i" from 1 to _maxVehicleLimit do { }; // spawn vehicle at temp location. - _vehicle = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"]; + _vehicle = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"]; if !(isNull _vehicle) then { // make vehicle immune from damage. _vehicle allowDamage false; @@ -186,6 +186,27 @@ for "_i" from 1 to _maxVehicleLimit do { // remove and add back magazines works for armed trucks but not helis ATM {_vehicle removeMagazineGlobal _x}count (magazines _vehicle); {_vehicle addMagazine _x}count (_arr select 6); + + // set damage and hitpoints + _vehicle setDamage _damage; + _allHitpoints = getAllHitPointsDamage _vehicle; + if !(_allHitpoints isEqualTo []) then{ + _actualHitpoints = _allHitpoints select 0; + if ((count _actualHitpoints) == (count _hitpoints)) then{ + { + _dmg = _hitpoints param [_forEachIndex,0]; + if (_x in ["HitFuel", "HitEngine"]) then { + _dmg = _dmg min 0.9; + }; + _vehicle setHitIndex [_forEachIndex, _dmg]; + } forEach _actualHitpoints; + }; + }; + _vehicle allowDamage true; + // vehicle simulation handler + if (_simulationHandler) then{ + _vehicle enableSimulationGlobal false; + }; // turrets /* _mags = _vehicle magazinesTurret [0]; @@ -220,38 +241,7 @@ for "_i" from 1 to _maxVehicleLimit do { diag_log format["DEBUG: invalid vehicle data: %1",_response]; }; }; - -// re-enable damage and apply to vehicles after we wait some time. -[_vehicleDamages,([_serverSettingsConfig, "immuneVehicleSpawnTime", 120] call EPOCH_fnc_returnConfigEntry),([_serverSettingsConfig, "simulationHandlerOld", false] call EPOCH_fnc_returnConfigEntry)] spawn { - params [["_vehicleDamages",[]],["_immuneTime",120],["_simulationHandler",false]]; - // wait for some time to let all vehicles settle. - sleep _immuneTime; - // set final damages - { - _x params ["_vehicle","_damage","_hitpoints"]; - _vehicle allowDamage true; - _vehicle setDamage _damage; - _allHitpoints = getAllHitPointsDamage _vehicle; - if !(_allHitpoints isEqualTo []) then{ - _actualHitpoints = _allHitpoints select 0; - if ((count _actualHitpoints) == (count _hitpoints)) then{ - { - _dmg = _hitpoints param [_forEachIndex,0]; - if (_x in ["HitFuel", "HitEngine"]) then { - _dmg = _dmg min 0.9; - }; - _vehicle setHitIndex [_forEachIndex, _dmg]; - } forEach _actualHitpoints; - }; - }; - // vehicle simulation handler - if (_simulationHandler) then{ - _vehicle enableSimulationGlobal false; - }; - } forEach _vehicleDamages; -}; // 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]; - true diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles_old.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles_old.sqf new file mode 100644 index 00000000..07150427 --- /dev/null +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles_old.sqf @@ -0,0 +1,264 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Load Vehicles + + Licence: + Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike + + Github: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf +*/ +private ["_location","_class","_dmg","_actualHitpoints","_hitpoints","_textures","_color","_colors","_textureSelectionIndex","_selections","_count","_objTypes","_objQty","_wMags","_wMagsArray","_attachments","_magazineSizeMax","_magazineName","_magazineSize","_qty","_objType","_marker","_found","_vehicle","_allHitpoints","_config","_worldspace","_damage","_arr","_arrNum","_vehicleSlotIndex","_vehHiveKey","_response","_immuneVehicleSpawnTime","_diag","_dataFormat","_dataFormatCount","_allVehicles","_serverSettingsConfig","_simulationHandler","_immuneVehicleSpawn"]; +params [["_maxVehicleLimit",0]]; + +_diag = diag_tickTime; +_dataFormat = ["", [], 0, [], 0, [], [], 0]; +_dataFormatCount = count _dataFormat; +EPOCH_VehicleSlots = []; +_allVehicles = []; + +_serverSettingsConfig = configFile >> "CfgEpochServer"; +_simulationHandler = [_serverSettingsConfig, "simulationHandlerOld", false] call EPOCH_fnc_returnConfigEntry; +_immuneVehicleSpawn = [_serverSettingsConfig, "immuneVehicleSpawn", false] call EPOCH_fnc_returnConfigEntry; + +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; + _arrNum = count _arr; + + if (_arrNum == _dataFormatCount) then { + + // Validate and replace invaild data + { + if !((_arr select _forEachIndex) isEqualType _x) then {_arr set[_forEachIndex, _x]}; + } forEach _dataFormat; + + _class = _arr select 0; + _worldspace = _arr select 1; + _damage = _arr select 2; + + if (_class != "" && _damage < 1) then { + _location = _worldspace deleteAt 0; + + if !(_location isEqualTo []) then { + + // increased position precision + if (count _location == 2) then{ + _location = (_location select 0) vectorAdd (_location select 1); + }; + + EPOCH_VehicleSlots deleteAt _vehicleSlotIndex; + + // temp for changes in class names + _found = ["O_Heli_Transport_04_F","O_Heli_Transport_04_bench_F","O_Heli_Transport_04_box_F","O_Heli_Transport_04_covered_F","B_Heli_Transport_03_unarmed_F","O_Truck_03_covered_F"] find _class; + if (_found != -1) then { + _class = ["O_Heli_Transport_04_EPOCH","O_Heli_Transport_04_bench_EPOCH","O_Heli_Transport_04_box_EPOCH","O_Heli_Transport_04_covered_EPOCH","B_Heli_Transport_03_unarmed_EPOCH","O_Truck_03_covered_EPOCH"] select _found; + }; + + _vehicle = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"]; + _allVehicles pushBack _vehicle; + _vehicle call EPOCH_server_setVToken; + _vehicle setVectorDirAndUp _worldspace; + _vehicle setposATL _location; + _vehicle setDamage _damage; + + _allHitpoints = getAllHitPointsDamage _vehicle; + if !(_allHitpoints isEqualTo []) then{ + _actualHitpoints = _allHitpoints select 0; + _hitpoints = _arr select 3; + if ((count _actualHitpoints) == (count _hitpoints)) then{ + { + _dmg = _hitpoints param [_forEachIndex,0]; + if (_x in ["HitFuel", "HitEngine"]) then { + _dmg = _dmg min 0.9; + }; + _vehicle setHitIndex [_forEachIndex, _dmg]; + } forEach _actualHitpoints; + }; + }; + + if (_immuneVehicleSpawn) then{ + _vehicle allowDamage false; + }; + + _vehicle setFuel (_arr select 4); + + _vehicle call EPOCH_server_vehicleInit; + + _config = configFile >> "CfgVehicles" >> _class >> "availableColors"; + if (isArray(_config)) then { + _color = _arr select 7; + _colors = getArray(_config); + _textureSelectionIndex = configFile >> "CfgVehicles" >> _class >> "textureSelectionIndex"; + _selections = if (isArray(_textureSelectionIndex)) then { getArray(_textureSelectionIndex) } else { [0] }; + _count = (count _colors) - 1; + { + _textures = _colors select 0; + if (_count >= _forEachIndex) then { + _textures = _colors select _forEachIndex; + }; + _vehicle setObjectTextureGlobal [_x, _textures select _color]; + } forEach _selections; + _vehicle setVariable ["VEHICLE_TEXTURE", _color]; + }; + + clearWeaponCargoGlobal _vehicle; + clearMagazineCargoGlobal _vehicle; + clearBackpackCargoGlobal _vehicle; + clearItemCargoGlobal _vehicle; + + _vehicle disableTIEquipment true; + + _vehicle lock true; + + _vehicle setVariable ["VEHICLE_SLOT", str(_i), true]; + + //diag_log format ["FILLING: _vehicle %1 pos: %2", _vehicle, (getPosATL _vehicle)]; + { + _objType = _forEachIndex; + + _objTypes = _x; + _objQty = []; + + if (_objType in [1, 2, 3]) then { + _objTypes = _x select 0; + _objQty = _x select 1; + }; + + { + switch _objType do { + // Weapon cargo + case 0: { + if (_x isEqualType []) then { + if ((count _x) >= 4) then { + + _vehicle addWeaponCargoGlobal[_x deleteAt 0, 1]; + + _attachments = []; + _wMags = false; + _wMagsArray = []; + // suppressor, laser, optics, magazines(array), bipods + { + // magazines + if (_x isEqualType []) then{ + _wMags = true; + _wMagsArray = _x; + } + else { + // attachments + if (_x != "") then{ + _attachments pushBack _x; + }; + }; + } forEach _x; + + // add all attachments to vehicle + // TODO replace with adding attachments directly to gun (Arma feature dependant) + { + _vehicle addItemCargoGlobal[_x, 1]; + } forEach _attachments; + + if (_wMags) then{ + if (_wMagsArray isEqualType [] && (count _wMagsArray) >= 2) then{ + _vehicle addMagazineAmmoCargo[_wMagsArray select 0, 1, _wMagsArray select 1]; + }; + }; + + }; + }; + }; + // Magazine cargo + case 1: { + _magazineName = _x; + _magazineSize = _objQty select _forEachIndex; + + if ((_magazineName isEqualType "STRING") && (_magazineSize isEqualType 0)) then { + _magazineSizeMax = getNumber (configFile >> "CfgMagazines" >> _magazineName >> "count"); + + // Add full magazines cargo + _vehicle addMagazineAmmoCargo [_magazineName, floor (_magazineSize / _magazineSizeMax), _magazineSizeMax]; + + // Add last non full magazine + if ((_magazineSize % _magazineSizeMax) > 0) then { + _vehicle addMagazineAmmoCargo [_magazineName, 1, floor (_magazineSize % _magazineSizeMax)]; + }; + }; + }; + // Backpack cargo + case 2: { + if (_x isEqualType "STRING") then { + _qty = _objQty select _forEachIndex; + _vehicle addBackpackCargoGlobal [_x, _qty]; + }; + }; + // Item cargo + case 3: { + if (_x isEqualType "STRING") then { + _qty = _objQty select _forEachIndex; + _vehicle addItemCargoGlobal [_x, _qty]; + }; + }; + }; + } forEach _objTypes; + } forEach (_arr select 5); + + // remove and add back magazines works for armed trucks but not helis ATM + {_vehicle removeMagazineGlobal _x}count (magazines _vehicle); + {_vehicle addMagazine _x}count (_arr select 6); + + // turrets + /* + _mags = _vehicle magazinesTurret [0]; + { + _object removeMagazinesTurret [_x, [0]]; + } forEach _mags; + + _mags = _vehicle magazinesTurret [-1]; + { + _object removeMagazinesTurret [_x, [-1]]; + } forEach _mags; + */ + + if (EPOCH_DEBUG_VEH) then { + _marker = createMarker [str(_location) , _location]; + _marker setMarkerShape "ICON"; + _marker setMarkerType "mil_dot"; + _marker setMarkerText _class; + _marker setMarkerColor "ColorGreen"; + }; + + if (_simulationHandler) then{ + _vehicle enableSimulationGlobal false; + }; + + + + }; + }; + }; + }; +}; + +// re-enable damage to vehicles after we wait +if (_immuneVehicleSpawn) then{ + _immuneVehicleSpawnTime = [_serverSettingsConfig, "immuneVehicleSpawnTime", 120] call EPOCH_fnc_returnConfigEntry; + [_allVehicles,_immuneVehicleSpawnTime] spawn{ + sleep (_this select 1); + {_x allowDamage true} count (_this select 0); + }; +}; + +addToRemainsCollector _allVehicles; + +diag_log format ["Epoch: Vehicle SPAWN TIMER %1, LOADED %2 VEHICLES", diag_tickTime - _diag, count _allVehicles]; + +true diff --git a/Sources/epoch_server/config.cpp b/Sources/epoch_server/config.cpp index acc0a46f..dec21dba 100644 --- a/Sources/epoch_server/config.cpp +++ b/Sources/epoch_server/config.cpp @@ -99,6 +99,7 @@ class CfgServerFunctions class server_save_killedStorage {}; class server_save_killedBuilding {}; class load_vehicles {}; + class load_vehicles_old {}; class load_storage {}; class server_save_storage {}; class spawn_vehicles {}; diff --git a/Sources/epoch_server/init/server_init.sqf b/Sources/epoch_server/init/server_init.sqf index 964cf6a3..e1185734 100644 --- a/Sources/epoch_server/init/server_init.sqf +++ b/Sources/epoch_server/init/server_init.sqf @@ -142,8 +142,11 @@ _vehicleSlotLimit = 0; {_vehicleSlotLimit = _vehicleSlotLimit + (_x select 1)} forEach _allowedVehiclesList; _ReservedSlots = 50; _vehicleSlotLimit = _vehicleSlotLimit + _ReservedSlots; -_vehicleSlotLimit call EPOCH_load_vehicles; - +if (EPOCH_useOldLoadVehicles) then { + _vehicleSlotLimit call EPOCH_load_vehicles_old; +} else { + _vehicleSlotLimit call EPOCH_load_vehicles; +}; diag_log "Epoch: Spawning vehicles"; _allowedVehiclesListArray = []; { diff --git a/Sources/epoch_server/init/server_variables.sqf b/Sources/epoch_server/init/server_variables.sqf index 2fc2118a..e5815b6f 100644 --- a/Sources/epoch_server/init/server_variables.sqf +++ b/Sources/epoch_server/init/server_variables.sqf @@ -58,7 +58,8 @@ _configArray = [ ["hiveAdminCmdExec", false], ["hiveAdminSavePlayerList", true], ["hiveAdminCmdTime", 5], - ["DEBUG_VEH", false] + ["DEBUG_VEH", false], + ["useOldLoadVehicles", false] ]; EPOCH_fnc_returnConfigEntry = { diff --git a/Sources/epoch_server/treeView.txt b/Sources/epoch_server/treeView.txt index 40dc3888..4af06ca1 100644 Binary files a/Sources/epoch_server/treeView.txt and b/Sources/epoch_server/treeView.txt differ diff --git a/Sources/epoch_server_core/build.hpp b/Sources/epoch_server_core/build.hpp index 5db56ac3..52e5377b 100644 --- a/Sources/epoch_server_core/build.hpp +++ b/Sources/epoch_server_core/build.hpp @@ -1 +1 @@ -build=561; +build=562; diff --git a/Sources/epoch_server_settings/build.hpp b/Sources/epoch_server_settings/build.hpp index 5db56ac3..52e5377b 100644 --- a/Sources/epoch_server_settings/build.hpp +++ b/Sources/epoch_server_settings/build.hpp @@ -1 +1 @@ -build=561; +build=562; diff --git a/build.txt b/build.txt index ed5e6e8f..1cb4f70c 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -561 +562