From d98025c8d938d19c80e04fa3bb86e021a8f0bb7d Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Mon, 12 Sep 2016 12:23:23 -0400 Subject: [PATCH] Fix random spawned vehicle loot saving Dynamic vehicle loot will save to database now even if no players interact with the vehicle before restart. --- SQF/dayz_server/compile/spawn_vehicles.sqf | 2 +- SQF/dayz_server/system/server_monitor.sqf | 4 ++++ Test Build/ReadMe.md | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/SQF/dayz_server/compile/spawn_vehicles.sqf b/SQF/dayz_server/compile/spawn_vehicles.sqf index ddb7686d6..70e8b9c76 100644 --- a/SQF/dayz_server/compile/spawn_vehicles.sqf +++ b/SQF/dayz_server/compile/spawn_vehicles.sqf @@ -82,6 +82,6 @@ if (count AllowedVehiclesList == 0) then { }; [_veh,[_dir,_objPosition],_vehicle,true,"0"] call server_publishVeh; - [_veh, "gear"] call server_updateObject; + _vehiclesToUpdate set [count _vehiclesToUpdate,_veh]; }; }; \ No newline at end of file diff --git a/SQF/dayz_server/system/server_monitor.sqf b/SQF/dayz_server/system/server_monitor.sqf index 33b3f38a9..03e527f27 100644 --- a/SQF/dayz_server/system/server_monitor.sqf +++ b/SQF/dayz_server/system/server_monitor.sqf @@ -454,6 +454,7 @@ if (_hiveLoaded) then { // spawn_vehicles // Get all buildings and roads only once. Very taxing, but only on first startup _serverVehicleCounter = _this; + _vehiclesToUpdate = []; _startTime = diag_tickTime; _buildingList = []; _cfgLootFile = missionConfigFile >> "CfgLoot" >> "Buildings"; @@ -483,6 +484,9 @@ if (_hiveLoaded) then { for "_x" from 1 to MaxMineVeins do {call spawn_mineveins;}; diag_log format["HIVE: BENCHMARK - Server finished spawning %1 DynamicVehicles, %2 Debris, %3 SupplyCrates and %4 MineVeins in %5 seconds",_vehLimit,MaxDynamicDebris,MaxAmmoBoxes,MaxMineVeins,diag_tickTime - _startTime]; + + //Update gear last after all dynamic vehicles are created to save random loot to database (low priority) + {[_x,"gear"] call server_updateObject} count _vehiclesToUpdate; }; }; diff --git a/Test Build/ReadMe.md b/Test Build/ReadMe.md index e0b991a59..4326545b5 100644 --- a/Test Build/ReadMe.md +++ b/Test Build/ReadMe.md @@ -3,11 +3,11 @@ Install instructions: -1. Download these two files: [[1.8.8 addons](http://se1.dayz.nu/latest/1.8.8/175/%40Client-1.8.8-d9b2d6a-FullDevelopment.rar)] [[Epoch addons](https://github.com/EpochModTeam/DayZ-Epoch/raw/master/Test%20Build/EpochTest-106-RC1.zip)] +1. Download these two files: [[1.8.8 addons](http://se1.dayz.nu/latest/1.8.8/177/%40Client-1.8.8-a101734-FullDevelopment.rar)] [[Epoch addons](https://github.com/EpochModTeam/DayZ-Epoch/raw/master/Test%20Build/EpochTest-106-RC1.zip)] 2. Make a copy of your @DayZ_Epoch1051 folder on both the client and server and rename it to @DayZ_Epoch106. -3. Copy the `@Client-1.8.8-d9b2d6a-FullDevelopment\@Dayz\Addons\` folder into your `@DayZ_Epoch106\` folder and overwrite files when prompted. Make sure to do this on both the client and server. +3. Copy the `@Client-1.8.8-x-FullDevelopment\@Dayz\Addons\` folder into your `@DayZ_Epoch106\` folder and overwrite files when prompted. Make sure to do this on both the client and server. 4. Copy the `EpochTest-106-RC1\addons\` folder into your `@DayZ_Epoch106\` folder and again overwrite files when prompted. Make sure to do this on both the client and server. @@ -23,9 +23,9 @@ Install instructions: 10. Modify your server and client launch parameters to use 106; instead of 1051;. In dayz_launcher you can go to the Advanced tab, disable all mods, then set `-mod=@DayZ_Epoch106;` in Settings > Additional Parameters. -11. Make a new dayz_epoch database using Server Files\epoch.sql OR update a 1051 database using Server Files\1.0.6_Updates.sql. Be sure to backup your old database first. +11. Make a new `dayz_epoch` database using Server Files\epoch.sql OR update a 1051 database using Server Files\1.0.6_Updates.sql. Be sure to backup your old database first. -Note: Both server and client need to be updated to current A2OA stable 1.63.131129 or newer. +Note: Both server and client should be updated to current A2OA stable 1.63.131129 or newer. Current Version: **EpochTest-106-RC1**