If this task in simple maps was probably piece of cake, I got headaches from my tiny brain trying to mitigate/solve problems developed by "Mix-Mapping" types a la MH-LandsOfNapali. That Level is done from pieces, the evidence are duplicated actors mooing around, we do have 1716 NavigationPoint actors spreading spam when DevPath goes in troubles. By injecting new paths and getting rid of others there is possible a clean Network with only 800+ NavigationPoint actors.
My problem has come from iterator foreach AllReachSpecs crashing during a call through Navigation and doing tweaks increasing cycles to the death.
Code: Select all
LANDSOFNAPALI: Attempting to screw up Evil NavigationPoint actors...
Critical: appError called:
Critical: PathsActor MH-LandsOfNapali.PathsActor0 (Function ANDSOFNAPALI.PathsActor.CleanupNavSpecs:0014) Runaway loop detected (over 10000000 iterations)
Critical: Windows GetLastError: The operation completed successfully. (0)
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Exit: UGalaxyAudioSubsystem::ShutdownAfterError
Log: DirectDraw End Mode
Exit: UD3D9RenderDevice::ShutdownAfterError
A code snippet from state which is processing/eliminating old network - I don't think this is final stage - is down there:
Spoiler
Code: Select all
auto state PathsMapping
{
Begin:
Sleep(0.01);
TD = Level.Game.GameSpeed;
BroadcastMessage("Waiting Map Patching Process...");
ConsoleCommand("SLOMO 0.11"); //Setup lag for prevent a bad start during DevPath attack- troubles might occur here
ChangeNastyActors();
Sleep(0.01);
DoAlterBadPoints();
cnt = 0;
A = Level.NavigationPointList;
While ( A != None )
{
cnt++;
if ( cnt >= 128 )
{
Sleep(0.00); //Break them
cnt = 0;
}
if ( Old != None )
Old.NextNavigationPoint = None;
A.bStatic = False;
A.bCollideWorld = False;
A.bCollideWhenPlacing = False;
G.CleanupNavSpecs(A);
if ( PlayerStart(A) == None && SpawnPoint(A) == None
&& Teleporter(A) == None && QueenDest(A) == None )
{
A.Tag = 'BORKED';
A.SetLocation( A.Location+vect(0,0,-3500) );
if ( InventorySpot(A) != None && InventorySpot(A).MarkedItem != None ) //Remove these
{
InventorySpot(A).MarkedItem.MyMarker = None;
InventorySpot(A).MarkedItem = None;
}
}
if ( PlayerStart(A) != None )
{
A.SetLocation(A.Location+vect(0,0,120));
A.bStatic=True;
}
Old = A;
A = A.NextNavigationPoint;
}
A = None;
Old = None;
Level.NavigationPointList = None;
cnt = 0;
Sleep(0.02);
GetNewNavList();
Sleep(0.00);
RebuildPrimaryNetwork(); //Old usable Navigation will go linked excepting useless stuff
Sleep(0.15); //And breath a bit
log ("Navigation processing done, spawning new paths...",LTag);
log ("Moving Navigation obstructions",LTag);
ReleaseRoutes(); //Moving to hell all doors - our tester guy need to figure good reachable spots
Sleep(0.05); //Breath, if previous task do takes time
ConsoleCommand("SLOMO"@TD); //Get back after applying hacks
SpawnPaths(); //Deploy our new stuff
Spawn(class'SomeActor'); //A sort of additional management
Sleep(0.00); //Breath a bit again - no rush
DoFakeNavigation(); //If bad spots are taking place use brute force
Sleep(0.05);
RestoreOriginal(); //After all parties bring back all Doors (movers)
Sleep(0.00);
DoReconnect(); //Cause forced links if are needed
Sleep(0.0);
DoAdditionalPostNavigation(); //Adds after Lifts Pathing
BroadcastMessage("Patching Process Done...");
Spawn(class'TelPathsHacker'); //Teleporter management - Lol Epic, thanks Higor
Spawn(class'NoLost'); //Default Bot must get some help when possible
GotoState(''); //Our job has ended here - thanks for participation
}
I think Final viable solution would be Editing map and removing duplicated actors because they do not have any purpose...
Opinions ?