Files
EscapistsReintroduced/docs/evidence/welcome-voice-2026-10-03/download-probe.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

28 lines
1.2 KiB
Plaintext

class ERR_WelcomeProof : ERR_WelcomeVoiceClient
{
void ERR_WelcomeProof(ERR_GameMode mode, int serial) { }
protected override bool Current() { return !m_Stopped; }
void Inspect() { PrintFormat("WELCOME STATE wait=%1 started=%2 stopped=%3 path=%4 valid=%5 context=%6", m_Wait, m_Started, m_Stopped, m_Path, ERR_WelcomeVoiceRules.URL("http://127.0.0.1:18947/welcome.b64"), GetGame().GetRestApi().GetContext("http://127.0.0.1:18947/")); }
}
modded class ArmaReforgerScripted
{
protected float m_ERRAudioProbeTime;
protected ref ERR_WelcomeProof m_ERRAudioProof;
protected bool m_ERRAudioProofDone;
override void OnUpdate(BaseWorld world, float timeslice)
{
super.OnUpdate(world, timeslice);
if (System.IsConsoleApp() || m_ERRAudioProofDone) return;
m_ERRAudioProbeTime += timeslice;
if (m_ERRAudioProbeTime < 15) return;
if (!m_ERRAudioProof)
{
AudioSystem.SetMasterVolume(AudioSystem.SFX, 1);
AudioSystem.SetMasterVolume(AudioSystem.Music, 0);
m_ERRAudioProof = new ERR_WelcomeProof(null, 9001);
}
m_ERRAudioProof.Tick(timeslice, true, "http://127.0.0.1:18947/welcome.b64");
if (m_ERRAudioProbeTime > 33) { m_ERRAudioProof.Inspect(); Print("ERR WELCOME AUDIO COMPLETE"); m_ERRAudioProofDone = true; }
}
}