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

39 lines
1.5 KiB
Plaintext

modded class ArmaReforgerScripted
{
protected bool m_ERRWelcomeServerReady;
protected float m_ERRWelcomeProbeElapsed;
protected float m_ERRWelcomeProbeNext;
protected bool m_ERRWelcomeLoadingReleased;
override void OnUpdate(BaseWorld world, float timeslice)
{
super.OnUpdate(world, timeslice);
ERR_GameMode mode = ERR_GameMode.Get();
if (!mode || !mode.Active()) return;
if (System.IsConsoleApp())
{
if (!m_ERRWelcomeServerReady) { Print("ERR WELCOME MISSION SERVER READY"); m_ERRWelcomeServerReady = true; }
return;
}
if (m_ERRWelcomeProbeElapsed == 0)
{
AudioSystem.SetMasterVolume(AudioSystem.SFX, 1);
AudioSystem.SetMasterVolume(AudioSystem.Music, 0);
}
m_ERRWelcomeProbeElapsed += timeslice;
if (GetPlayerController() && m_ERRWelcomeProbeElapsed > 8 && !m_ERRWelcomeLoadingReleased)
{
// The no-backend server has no player identity and cannot admit a soldier.
// Release only this fixture's spawn placeholder after proving the real gate waits.
SCR_RespawnSystemComponent respawn = SCR_RespawnSystemComponent.GetInstance();
if (respawn) respawn.DestroyLoadingPlaceholder();
m_ERRWelcomeLoadingReleased = true;
Print("ERR WELCOME MISSION FIXTURE LOADING RELEASED");
}
if (m_ERRWelcomeProbeElapsed >= m_ERRWelcomeProbeNext)
{
m_ERRWelcomeProbeNext = m_ERRWelcomeProbeElapsed + 10;
PrintFormat("ERR WELCOME MISSION STATE active=%1 controller=%2 menu=%3 url=%4", mode.Active(), GetPlayerController() != null, GetMenuManager().GetTopMenu() != null, mode.ERR_WelcomeVoiceURL());
}
}
}