mirror of
https://github.com/Ghostrider-DbD-/GMS_RC.git
synced 2024-08-30 16:02:11 +00:00
97 lines
2.7 KiB
Plaintext
97 lines
2.7 KiB
Plaintext
/*
|
|
By Ghostrider [GRG]
|
|
Copyright 2016
|
|
--------------------------
|
|
License
|
|
--------------------------
|
|
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
|
|
|
|
http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
*/
|
|
#include "\GMS\Compiles\Init\GMS_defines.hpp"
|
|
|
|
private["_timer1sec","_timer5sec","_timer10Sec","_timer20sec","_timer5min","_timer5min"];
|
|
_timer2sec = diag_tickTime + 2;
|
|
_timer5sec = diag_tickTime + 5;
|
|
_timer10Sec = diag_tickTime + 10;
|
|
_timer20sec = diag_tickTime + 20;
|
|
_timer1min = diag_tickTime + 10;
|
|
_timer5min = diag_tickTime + 300;
|
|
|
|
while {true} do
|
|
{
|
|
uiSleep 1;
|
|
|
|
if (diag_tickTime > _timer2sec) then
|
|
{
|
|
[] spawn GMS_fnc_monitorSpawnedMissions;
|
|
if (GMS_showCountAliveAI) then
|
|
{
|
|
{
|
|
_x call GMS_fnc_updateMarkerAliveCount;
|
|
} forEach GMS_missionLabelMarkers;
|
|
};
|
|
_timer2sec = diag_tickTime + 2;
|
|
};
|
|
|
|
if (diag_tickTime > _timer5sec) then
|
|
{
|
|
_timer5sec = diag_tickTime + 5;
|
|
if (GMS_simulationManager isEqualTo GMS_useBlckeaglsSimulationManagement) then {[] call GMS_fnc_simulationMonitor};
|
|
[] call GMS_fnc_vehicleMonitor;
|
|
#ifdef GRGserver
|
|
[] call GMS_fnc_broadcastServerFPS;
|
|
#endif
|
|
};
|
|
if (diag_tickTime > _timer10Sec) then
|
|
{
|
|
_timer10Sec = diag_tickTime + 10;
|
|
[] call GMS_fnc_scanForPlayersNearVehicles;
|
|
[] call GMS_fnc_spawnNewMissions;
|
|
[] spawn GMS_fnc_monitorInitializedMissions;
|
|
};
|
|
|
|
if ((diag_tickTime > _timer1min)) then
|
|
{
|
|
_timer1min = diag_tickTime + 60;
|
|
[] call GMS_fnc_restoreHiddenObjects;
|
|
[] call GMS_fnc_groupWaypointMonitor;
|
|
[] call GMS_fnc_cleanupAliveAI;
|
|
};
|
|
if (diag_tickTime > _timer5min) then
|
|
{
|
|
private _clientID = if (clientOwner == 2) then {"Dedicated Server"} else {"Headless Client"};
|
|
[
|
|
format["Timstamp %1 | Missions Running %2 | Vehicles %3 | Groups %4 | Missions Run %5 | Server FPS %6 | Server Uptime %7 Min | Running on %8",
|
|
diag_tickTime,
|
|
GMS_missionsRunning,
|
|
count GMS_monitoredVehicles,
|
|
count GMS_monitoredMissionAIGroups,
|
|
GMS_missionsRun,
|
|
diag_FPS,
|
|
floor(diag_tickTime/60),
|
|
_clientID
|
|
]
|
|
] call GMS_fnc_log;
|
|
if (GMS_debugLevel > 0) then
|
|
{
|
|
private _activeScripts = diag_activeScripts;
|
|
[
|
|
format["count diag_activeSQFScripts %1 | Threads [spawned %2, execVM %3]",
|
|
count diag_activeSQFScripts,
|
|
_activeScripts select 0,
|
|
_activeScripts select 1
|
|
//GMS_activeMonitorThreads
|
|
]
|
|
] call GMS_fnc_log;
|
|
{
|
|
[format["file %1 | running %2",(_x select 1),(_x select 2)]] call GMS_fnc_log;
|
|
} forEach diag_activeSQFScripts;
|
|
};
|
|
[] call GMS_fnc_cleanEmptyGroups;
|
|
[GMS_landVehiclePatrols] call GMSCore_fnc_removeNullEntries;
|
|
[GMS_aircraftPatrols] call GMSCore_fnc_removeNullEntries;
|
|
_timer5min = diag_tickTime + 300;
|
|
};
|
|
};
|