Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
31 lines
1.2 KiB
Plaintext
31 lines
1.2 KiB
Plaintext
modded class ArmaReforgerScripted
|
|
{
|
|
protected RadioManagerEntity m_ERRRadioFixtureOriginal;
|
|
protected bool m_ERRRadioFixtureDone;
|
|
protected override void OnWorldPostProcess(World world)
|
|
{
|
|
SCR_BaseGameMode mode = SCR_BaseGameMode.Cast(GetGameMode());
|
|
ChimeraWorld chimera = ChimeraWorld.CastFrom(world);
|
|
RadioManagerEntity radio;
|
|
if (chimera) radio = chimera.GetRadioManager();
|
|
if (Replication.IsServer() && mode && !ERR_GameMode.Cast(mode) && radio)
|
|
{
|
|
m_ERRRadioFixtureOriginal = radio;
|
|
SCR_EntityHelper.DeleteEntityAndChildren(radio);
|
|
PrintFormat("ERR RADIO FIXTURE SETUP: missing parent=%1", radio && radio.GetParent() == mode);
|
|
}
|
|
super.OnWorldPostProcess(world);
|
|
}
|
|
override void OnUpdate(BaseWorld world, float timeslice)
|
|
{
|
|
super.OnUpdate(world, timeslice);
|
|
ERR_GameMode mode = ERR_GameMode.Get();
|
|
if (m_ERRRadioFixtureDone || !mode || !mode.Active()) return;
|
|
m_ERRRadioFixtureDone = true;
|
|
ChimeraWorld chimera = ChimeraWorld.CastFrom(world);
|
|
RadioManagerEntity radio = chimera.GetRadioManager();
|
|
bool ok = radio && !radio.GetParent() && !m_ERRRadioFixtureOriginal;
|
|
PrintFormat("ERR RADIO FIXTURE RESULT: missing ok=%1 radio=%2", ok, radio);
|
|
}
|
|
}
|