Files
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

51 lines
1.9 KiB
Plaintext

modded class SCR_RespawnSystemComponent
{
int m_ERRProbeFrames;
override void UpdateLoadingPlaceholder(float dt)
{
m_ERRProbeFrames++;
super.UpdateLoadingPlaceholder(dt);
}
}
modded class DeployMenuSystem
{
bool ERR_ProbeBinding(SCR_RespawnSystemComponent respawn)
{
m_RespawnSystem = null; m_bReady = true; Enable(false);
ERR_BindEscapeRespawn(respawn);
if (m_RespawnSystem != respawn || m_bReady) return false;
m_bReady = true;
ERR_BindEscapeRespawn(respawn);
if (!m_bReady) return false;
m_bReady = false;
return true;
}
}
modded class ArmaReforgerScripted
{
protected bool m_ERRProbeStarted, m_ERRProbeDone;
protected float m_ERRProbeAt;
override void OnUpdate(BaseWorld world, float timeslice)
{
super.OnUpdate(world, timeslice);
ERR_GameMode mode = ERR_GameMode.Get();
if (m_ERRProbeDone || !world || !mode || !mode.Active()) return;
SCR_RespawnSystemComponent respawn = SCR_RespawnSystemComponent.Cast(mode.FindComponent(SCR_RespawnSystemComponent));
if (!m_ERRProbeStarted)
{
m_ERRProbeStarted = true; m_ERRProbeAt = world.GetWorldTime();
if (mode.GetAutoReloadDelay() == 10) Print("ERR LOADING PASS: native restart delay is 10 seconds");
else PrintFormat("ERR LOADING FAIL: delay=%1", mode.GetAutoReloadDelay());
DeployMenuSystem updates = DeployMenuSystem.Cast(GetGame().GetWorld().FindSystem(DeployMenuSystem));
if (updates && updates.ERR_ProbeBinding(respawn)) Print("ERR LOADING PASS: native system rebinds stale cache and preserves repeated binding readiness");
else Print("ERR LOADING FAIL: native binding");
respawn.m_ERRProbeFrames = 0;
}
if (world.GetWorldTime() - m_ERRProbeAt < 1500) return;
if (respawn.m_ERRProbeFrames > 10) PrintFormat("ERR LOADING PASS: native updater delivers %1 frames to replacement respawn", respawn.m_ERRProbeFrames);
else PrintFormat("ERR LOADING FAIL: frames=%1", respawn.m_ERRProbeFrames);
m_ERRProbeDone = true;
Print("ERR LOADING COMPLETE");
}
}