Files
EscapistsReintroduced/docs/evidence/terrain-takeover-feature-2026-10-01/dedicated-restart/validation-overlay.c.txt
T
jakub 6a667d8deb Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
2026-10-13 22:52:53 +02:00

24 lines
1007 B
Plaintext

class ERR_DedicatedRestartProof
{
static bool Requested;
}
modded class ArmaReforgerScripted
{
protected float m_ERRRestartDelay = 5;
override void OnUpdate(BaseWorld world, float timeslice)
{
super.OnUpdate(world, timeslice);
ERR_GameMode mode = ERR_GameMode.Get();
if (!Replication.IsServer() || !mode || !mode.Active() || ERR_DedicatedRestartProof.Requested) return;
m_ERRRestartDelay -= timeslice;
if (m_ERRRestartDelay > 0) return;
ERR_DedicatedRestartProof.Requested = true;
PrintFormat("ERR DEDICATED RESTART: accepted=%1", GameStateTransitions.RequestScenarioRestart());
}
override protected void OnBeforeWorldCleanup()
{
super.OnBeforeWorldCleanup();
PrintFormat("ERR DEDICATED CLEANUP: stage=%1 worldClear=%2 oldModeClear=%3 elapsed=%4 admissions=%5 airports=%6 slots=%7", m_ERRTerrainStage, m_ERRTerrainWorld == null, m_ERRTerrainOriginal == null, m_ERRTerrainElapsed, m_ERRTerrainAdmissions.Count(), m_ERRTerrainAirfields.Count(), m_ERRTerrainMarkerSlots.Count());
}
}