Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
24 lines
1007 B
Plaintext
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());
|
|
}
|
|
}
|