Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
modded class ArmaReforgerScripted
|
||||
{
|
||||
protected override void OnWorldPostProcess(World world)
|
||||
{
|
||||
string enabled;
|
||||
if (!SCR_Global.IsEditMode() && System.GetCLIParam("errTerrainTakeover", enabled) && enabled == "1" && !ERR_GameMode.Get())
|
||||
{
|
||||
PrintFormat("ERR TAKEOVER PROBE: old mode=%1 authority=%2", GetGameMode(), Replication.IsServer());
|
||||
array<IEntity> managers = {GetGameMode(), GetLoadoutManager(), GetFactionManager(), GetPerceptionManager(), GetChat()};
|
||||
ChimeraWorld chimera = ChimeraWorld.CastFrom(world);
|
||||
if (chimera) managers.Insert(chimera.GetRadioManager());
|
||||
foreach (IEntity manager : managers) if (manager) SCR_EntityHelper.DeleteEntityAndChildren(manager);
|
||||
PrintFormat("ERR TAKEOVER PROBE: removed mode=%1 factions=%2", GetGameMode(), GetFactionManager());
|
||||
if (Replication.IsServer())
|
||||
{
|
||||
EntitySpawnParams markerParams = new EntitySpawnParams();
|
||||
markerParams.TransformMode = ETransformMode.WORLD;
|
||||
markerParams.Transform[3] = "1525 0 5075";
|
||||
IEntity marker = SpawnEntity(GenericEntity, world, markerParams);
|
||||
marker.SetName("ERR_Airfield_0");
|
||||
IEntity mode = SpawnEntityPrefab(Resource.Load("{8FB1559AE3F29722}Prefabs/ERR/TerrainConnector.et"), world);
|
||||
PrintFormat("ERR TAKEOVER PROBE: spawned mode=%1 registered=%2 factions=%3", mode, GetGameMode(), GetFactionManager());
|
||||
}
|
||||
}
|
||||
super.OnWorldPostProcess(world);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user