Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
56 lines
3.2 KiB
Plaintext
56 lines
3.2 KiB
Plaintext
|
|
modded class ArmaReforgerScripted
|
|
{
|
|
protected float m_ERRManagerNext;
|
|
override void OnUpdate(BaseWorld world, float timeslice)
|
|
{
|
|
super.OnUpdate(world, timeslice);
|
|
m_ERRManagerNext -= timeslice;
|
|
if (m_ERRManagerNext > 0 || Replication.IsServer()) return;
|
|
m_ERRManagerNext = 5;
|
|
ERR_GameMode mode = ERR_GameMode.Get();
|
|
if (!mode || !mode.ERR_TerrainTakenOver()) return;
|
|
ChimeraWorld chimera = ChimeraWorld.CastFrom(GetWorld());
|
|
PrintFormat("ERR NATIVE POINTERS: faction=%1 loadouts=%2 perception=%3 chat=%4 radio=%5", GetFactionManager(), GetLoadoutManager(), GetPerceptionManager(), GetChat(), chimera.GetRadioManager());
|
|
SCR_AdditionalGameModeSettingsComponent settings = SCR_AdditionalGameModeSettingsComponent.GetInstance();
|
|
SCR_PerceivedFactionManagerComponent perceived = SCR_PerceivedFactionManagerComponent.GetInstance();
|
|
SCR_PlayerListedAdminManagerComponent admins = SCR_PlayerListedAdminManagerComponent.GetInstance();
|
|
SCR_IdentityManagerComponent identity = SCR_IdentityManagerComponent.GetInstance();
|
|
SCR_EntityCatalogManagerComponent catalog = SCR_EntityCatalogManagerComponent.GetInstance();
|
|
PrintFormat("ERR FACTION CACHE PROOF: catalog=%1 identity=%2", catalog && catalog.ERR_ProbeFactionCurrent(), identity && identity.ERR_ProbeFactionCurrent());
|
|
PrintFormat("ERR MANAGER PROOF: settings=%1 perceived=%2 admins=%3 identity=%4 catalog=%5 factions=%6 loadouts=%7 perception=%8 chat=%9", settings && settings.GetOwner() == mode, perceived && perceived.GetOwner() == mode, admins && admins.GetOwner() == mode, identity && identity.GetOwner() == mode, catalog && catalog.GetOwner() == mode, GetFactionManager() != null, GetLoadoutManager() != null, GetPerceptionManager() != null, GetChat() != null);
|
|
}
|
|
}
|
|
|
|
modded class SCR_EntityCatalogManagerComponent
|
|
{
|
|
bool ERR_ProbeFactionCurrent() { return m_FactionManager && m_FactionManager == GetGame().GetFactionManager(); }
|
|
}
|
|
modded class SCR_IdentityManagerComponent
|
|
{
|
|
bool ERR_ProbeFactionCurrent() { return m_FactionManager && m_FactionManager == GetGame().GetFactionManager(); }
|
|
}
|
|
class ERR_PairRestartProof
|
|
{
|
|
static bool Requested;
|
|
}
|
|
modded class ArmaReforgerScripted
|
|
{
|
|
protected float m_ERRRestartDelay = 80;
|
|
override void OnUpdate(BaseWorld world, float timeslice)
|
|
{
|
|
super.OnUpdate(world, timeslice);
|
|
ERR_GameMode mode = ERR_GameMode.Get();
|
|
if (!Replication.IsServer() || !mode || !mode.Active() || GetPlayerManager().GetPlayerCount() < 1 || ERR_PairRestartProof.Requested) return;
|
|
m_ERRRestartDelay -= timeslice;
|
|
if (m_ERRRestartDelay > 0) return;
|
|
ERR_PairRestartProof.Requested = true;
|
|
PrintFormat("ERR CONNECTED RESTART: players=%1 accepted=%2", GetPlayerManager().GetPlayerCount(), GameStateTransitions.RequestScenarioRestart());
|
|
}
|
|
override protected void OnBeforeWorldCleanup()
|
|
{
|
|
super.OnBeforeWorldCleanup();
|
|
PrintFormat("ERR PAIR CLEANUP: server=%1 clientFlag=%2 stage=%3 worldClear=%4 oldModeClear=%5 elapsed=%6 admissions=%7 airports=%8 slots=%9", Replication.IsServer(), ERR_IsClientTerrainTakeover(), m_ERRTerrainStage, m_ERRTerrainWorld == null, m_ERRTerrainOriginal == null, m_ERRTerrainElapsed, m_ERRTerrainAdmissions.Count(), m_ERRTerrainAirfields.Count(), m_ERRTerrainMarkerSlots.Count());
|
|
}
|
|
}
|