From 87daad7d45d759fbb22a0f032e8482696613801a Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Wed, 25 Jan 2017 08:14:55 -0500 Subject: [PATCH 1/3] Correction of typos --- .../Functions/GMS_fnc_broadcastServerFPS.sqf | 8 ++ .../Functions/GMS_fnc_mainThread - Copy.sqf | 74 ------------------- .../Compiles/Functions/GMS_fnc_mainThread.sqf | 13 ++-- .../Compiles/Functions/broadcastServerFPS.sqf | 14 ---- .../custom_server/Compiles/blck_functions.sqf | 6 +- @epochhive/addons/custom_server/changeLog.sqf | 2 +- 6 files changed, 20 insertions(+), 97 deletions(-) create mode 100644 @epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_broadcastServerFPS.sqf delete mode 100644 @epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread - Copy.sqf delete mode 100644 @epochhive/addons/custom_server/Compiles/Functions/broadcastServerFPS.sqf diff --git a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_broadcastServerFPS.sqf b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_broadcastServerFPS.sqf new file mode 100644 index 0000000..635575c --- /dev/null +++ b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_broadcastServerFPS.sqf @@ -0,0 +1,8 @@ + + +blck_serverFPS = diag_FPS; +publicVariable "blck_serverFPS"; + + + + diff --git a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread - Copy.sqf b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread - Copy.sqf deleted file mode 100644 index c9a7021..0000000 --- a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread - Copy.sqf +++ /dev/null @@ -1,74 +0,0 @@ -/* - Call as : [] call blck_fnc_mainThread; - - Run a loop that checks data arrays regarding: - - whether it is time to delete the mission objects at a specific location - - whether it is time to delete live AI associated with a specific mission - By Ghostrider-DbD- - Last modified 1-22-17 -*/ -private ["_timer10Min","_timer1sec","_timer5sec","_timer5min","_modType","_coords"]; -_timer1sec = diag_tickTime; -_timer5sec = diag_tickTime; -_timer20sec = diag_tickTime; -//_timer1min = diag_tickTime; -_timer5min = diag_tickTime; -//_timer10Min = diag_tickTime; -_modType = [] call blck_fnc_getModType; - - -while {true} do -{ - uiSleep 1; // defined in custom_server\compiles\blck_variables.sqf - if ((diag_tickTime - _timer1sec) > 3) then - { - [] call blck_fnc_vehicleMonitor; - _timer1sec = diag_tickTime; - }; - if ((diag_tickTime - _timer5sec) > 15) then - { - [] call blck_fnc_cleanupAliveAI; - [] call blck_fnc_cleanupObjects; - [] call blck_fnc_cleanupDeadAI; - if (_modType isEqualTo "Epoch") then { - [] call blck_fnc_cleanEmptyGroups; - }; // Exile cleans up empty groups automatically so this should not be needed with that mod. - - diag_log format["_fnc_mainThread:: (37) blck_pendingMissions = %1", blck_pendingMissions]; - { - if (blck_debugLevel > 2) then {diag_log format["_fnc_mainThread:: -- >> _x = %1 and _x select 6 = %2",_x, _x select 6];}; - if (_x select 6 > 0) then // The mission is not running, check the time left till it is spawned - { - if (diag_tickTime > (_x select 6)) then // time to spawn the mission - { - private _coords = [] call blck_fnc_FindSafePosn; - _coords pushback 0; - private["_missionName","_missionPath"]; - _missionName = selectRandom (_x select 0); - _missionPath = _x select 1; - [_coords,_x] execVM format["\q\addons\custom_server\Missions\%1\%2.sqf",_missionPath,_missionName]; - }; - }; - }forEach blck_pendingMissions; - _timer5sec = diag_tickTime; - - }; - - if ((diag_tickTime - _timer5min) > 300) then { - if (blck_timeAcceleration) then - { - //if (blck_debugON) then {diag_log "[blckeagls] calling time acceleration module";}; - [] call blck_fnc_timeAcceleration; - }; - if (blck_useHC) then {[] call blck_fnc_monitorHC;}; // Not working - _timer5min = diag_tickTime; - }; - - /* - if ((diag_tickTime - _timer10Min) > 600) then - { - // Reserved for future use - _timer10Min = diag_tickTime; - }; - */ -}; diff --git a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf index fcd9a3f..316caad 100644 --- a/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf +++ b/@epochhive/addons/custom_server/Compiles/Functions/GMS_fnc_mainThread.sqf @@ -1,12 +1,9 @@ /* - Call as : [] call blck_fnc_mainThread; - - Run a loop that checks data arrays regarding: - - whether it is time to delete the mission objects at a specific location - - whether it is time to delete live AI associated with a specific mission By Ghostrider-DbD- Last modified 1-24-17 */ +//#define DBDserver 1 + diag_log format["starting _fnc_mainThread with time = %1",diag_tickTime]; private["_modType","_timer1sec","_timer20sec","_timer5min"]; _timer1sec = diag_tickTime; @@ -17,9 +14,12 @@ while {true} do { uiSleep 1; //diag_log format["mainThread:: -- > time = %1",diag_tickTime]; - if (diag_tickTime - _timer1sec > 1000) then + if (diag_tickTime - _timer1sec > 1) then { [] call blck_fnc_vehicleMonitor; + #ifdef DBDserver + [] call blck_fnc_broadcastServerFPS; + #endif _timer1sec - diag_tickTime; }; if (diag_tickTime - _timer20sec > 20) then @@ -38,5 +38,4 @@ while {true} do { [] call blck_fnc_timeAcceleration; }; - }; diff --git a/@epochhive/addons/custom_server/Compiles/Functions/broadcastServerFPS.sqf b/@epochhive/addons/custom_server/Compiles/Functions/broadcastServerFPS.sqf deleted file mode 100644 index 97c60ec..0000000 --- a/@epochhive/addons/custom_server/Compiles/Functions/broadcastServerFPS.sqf +++ /dev/null @@ -1,14 +0,0 @@ - - -private["_startTime"]; -_startTime = diag_tickTime; -[] spawn { - while {true} do - { - blck_serverFPS = diag_FPS; - publicVariable "blck_serverFPS"; - uiSleep 3; - }; -}; - - diff --git a/@epochhive/addons/custom_server/Compiles/blck_functions.sqf b/@epochhive/addons/custom_server/Compiles/blck_functions.sqf index 93ad61a..35db98e 100644 --- a/@epochhive/addons/custom_server/Compiles/blck_functions.sqf +++ b/@epochhive/addons/custom_server/Compiles/blck_functions.sqf @@ -6,6 +6,7 @@ */ blck_functionsCompiled = false; +//#define DBDserver 1 // General functions blck_fnc_waitTimer = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_waitTimer.sqf"; blck_fnc_timedOut = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_timedOut.sqf"; @@ -19,7 +20,10 @@ blck_fnc_getModType = compileFinal preprocessFileLineNumbers "\q\addons\custom_ blck_fnc_groupsOnAISide = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_GroupsOnAISide.sqf"; // Returns the number of groups on the side used by AI blck_fnc_emptyObject = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_emptyObject.sqf"; blck_fnc_playerInRange = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRange.sqf"; -blck_fnc_mainThread = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_mainThread.sqf"; // +blck_fnc_mainThread = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_mainThread.sqf"; +#ifdef DBDserver +blck_fnc_broadcastServerFPS = = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_broadcastServerFPS.sqf"; +#endif // Player-related functions blck_fnc_rewardKiller = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_rewardKiller.sqf"; blck_fnc_MessagePlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_AIM.sqf"; // Send messages to players regarding Missions diff --git a/@epochhive/addons/custom_server/changeLog.sqf b/@epochhive/addons/custom_server/changeLog.sqf index 2f6df91..854d8a7 100644 --- a/@epochhive/addons/custom_server/changeLog.sqf +++ b/@epochhive/addons/custom_server/changeLog.sqf @@ -4,7 +4,7 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2 Contributions by Narines: bug fixes, testing, infinite ammo fix. Ideas or code from that by Vampire and KiloSwiss have been used for certain functions. -1/24/17 Version 6.55 Build 34 +1/24/17 Version 6.55 Build 35 Added a new configuration blck_killEmptyStaticWeapons which determines if static weapons shoudl be disabled after the AI is killed. Added a configuration blck_cleanUpLootChests that determines if loot crates are deleted when other mission objects are deleted. Fixed an issue that prevented proper deletion of mission objects and live AI. From 033b057daf9ca8e2a55ab6d187326aa611ed4c63 Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sat, 28 Jan 2017 20:08:02 -0500 Subject: [PATCH 2/3] Bug fixes. --- .../Compiles/TimeAccel/GMS_fnc_Time.sqf | 13 ++++++++++--- .../custom_server/Configs/blck_configs_exile.sqf | 3 +++ @epochhive/addons/custom_server/init/blck_init.sqf | 2 +- @epochhive/addons/custom_server/init/build.sqf | 4 ++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf b/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf index 7c2c50f..8e1ebcb 100644 --- a/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf +++ b/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf @@ -21,12 +21,19 @@ _time = dayTime; //diag_log format["_fnc_Time:: -- > _sunrise = %1 | _sunset = %2 | _time = %3",_sunrise,_sunset,_time]; // Night -if (_time > (_sunset + 0.5) || _time < (_sunrise - 0.5)) exitWith {setTimeMultiplier blck_timeAccelerationNight; diag_log format["NIGHT TIMGE ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime];}; +if (_time > (_sunset + 0.5) || _time < (_sunrise - 0.5)) exitWith { + setTimeMultiplier blck_timeAccelerationNight; + //diag_log format["NIGHT TIMGE ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; +}; // Day -if (_time > (_sunrise + 0.5) && _time < (_sunset - 0.5)) exitWith {setTimeMultiplier blck_timeAccelerationDay; diag_log format["DAYTIME ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime];}; +if (_time > (_sunrise + 0.5) && _time < (_sunset - 0.5)) exitWith { + setTimeMultiplier blck_timeAccelerationDay; + //diag_log format["DAYTIME ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; +}; // default -setTimeMultiplier blck_timeAccelerationDusk; diag_log format["DUSK ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; +setTimeMultiplier blck_timeAccelerationDusk; +//diag_log format["DUSK ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; diff --git a/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf b/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf index e0be19a..b194105 100644 --- a/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf +++ b/@epochhive/addons/custom_server/Configs/blck_configs_exile.sqf @@ -27,7 +27,10 @@ Last modified 8/1/15 **************************************************************/ // if true then missions will not spawn within 1000 m of spawn points for Altis, Bornholm, Cherno, Esseker or stratis. + blck_listConcreteMixerZones = true; + blck_blacklistSpawns = true; blck_blacklistTraderCities = true; // Set this = true if you would like the mission system to automatically search for the locations of the Epoch trader cities. Note that these are pre-defined in GMS_fnc_findWorld for the most common maps. + // list of locations that are protected against mission spawns switch (toLower(worldName)) do diff --git a/@epochhive/addons/custom_server/init/blck_init.sqf b/@epochhive/addons/custom_server/init/blck_init.sqf index d84414b..bd9146a 100644 --- a/@epochhive/addons/custom_server/init/blck_init.sqf +++ b/@epochhive/addons/custom_server/init/blck_init.sqf @@ -45,7 +45,7 @@ if (_modType isEqualTo "Exile") then waitUntil {(isNil "blck_configsLoaded") isEqualTo false;}; waitUntil{blck_configsLoaded}; blck_configsLoaded = nil; - if (blck_blacklistTraderCities || blck_blacklistSpawns || blcklistConcreteMixerZones) then {execVM "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getTraderCitesExile.sqf";}; + if (blck_blacklistTraderCities || blck_blacklistSpawns || blck_listConcreteMixerZones) then {execVM "\q\addons\custom_server\Compiles\Functions\GMS_fnc_getTraderCitesExile.sqf";}; }; // spawn map addons to give the server time to position them before spawning in crates etc. diff --git a/@epochhive/addons/custom_server/init/build.sqf b/@epochhive/addons/custom_server/init/build.sqf index 8aee4ea..b13163a 100644 --- a/@epochhive/addons/custom_server/init/build.sqf +++ b/@epochhive/addons/custom_server/init/build.sqf @@ -1,3 +1,3 @@ private ["_version","_versionDate"]; -_blck_version = "6.55 Build 36"; -_blck_versionDate = "1-24-17 11:50 PM"; +_blck_version = "6.55 Build 37"; +_blck_versionDate = "1-28-17 11:50 PM"; From ee50094deb82b9590dfe6a8c7e70605003360a88 Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sun, 29 Jan 2017 02:37:52 -0500 Subject: [PATCH 3/3] Disabled unnecessary logging. --- .../addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf b/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf index f8a942b..dd8aa9f 100644 --- a/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf +++ b/@epochhive/addons/custom_server/Compiles/TimeAccel/GMS_fnc_Time.sqf @@ -22,13 +22,13 @@ _time = dayTime; // Night if (_time > (_sunset + 0.5) || _time < (_sunrise - 0.5)) exitWith { setTimeMultiplier blck_timeAccelerationNight; - //diag_log format["NIGHT TIMGE ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; + diag_log format["NIGHT TIMGE ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; }; // Day if (_time > (_sunrise + 0.5) && _time < (_sunset - 0.5)) exitWith { setTimeMultiplier blck_timeAccelerationDay; - //diag_log format["DAYTIME ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; + diag_log format["DAYTIME ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; }; // default