PrunedPaths can be seen only with DrawPaths mutator - IF ARE PLACED NORMALLY, Editor doesn't show them...
UnEdCam.cpp
Code: Select all
// Draw all paths. //Sektor - EXCEPT PRUNED, LOL
if( (Viewport->Actor->ShowFlags&SHOW_Paths) && Viewport->Actor->GetLevel()->ReachSpecs.Num() )
{
for( INT i=0; i<Viewport->Actor->GetLevel()->ReachSpecs.Num(); i++ )
{
FReachSpec& ReachSpec = Viewport->Actor->GetLevel()->ReachSpecs( i );
if( ReachSpec.Start && ReachSpec.End && !ReachSpec.bPruned ) //Suuuure... all paths - Not today
{
Viewport->RenDev->Draw3DLine
(
Frame,
ReachSpec.MonsterPath() ? C_GroundHighlight.Plane() : C_ActorArrow.Plane(),
LINE_DepthCued,
ReachSpec.Start->Location,
ReachSpec.End->Location
);
}
}
}
And then... ReachSpecs are removed from Paths and UpStreamPaths when are Pruned and moved to PrunedPaths lists which ARE NOT DRAWN due to original decisions which I really don't get what was all about these "secret" paths.
Code: Select all
int FPathBuilder::Prune(AActor *Node)
{
guard(FPathBuilder::Prune);
int pruned = 0;
ANavigationPoint* NavNode = (ANavigationPoint *)Node;
int n,j;
FReachSpec alternatePath, straightPath, part1, part2;
int i=0;
while ( (i<16) && (NavNode->upstreamPaths[i] != -1) )
{
part1 = Level->ReachSpecs(NavNode->upstreamPaths[i]);
n=0;
while ( (n<16) && (NavNode->Paths[n] != -1) )
{
part2 = Level->ReachSpecs(NavNode->Paths[n]);
INT straightPathIndex = specFor(part1.Start, part2.End);
if (straightPathIndex != -1)
{
straightPath = Level->ReachSpecs(straightPathIndex);
alternatePath = part1 + part2;
if ( ((float)straightPath.distance * 1.2 >= (float)alternatePath.distance)
&& ((alternatePath <= straightPath) || straightPath.BotOnlyPath()
|| alternatePath.MonsterPath()) )
{
//prune straightpath
pruned++;
j=0;
ANavigationPoint* StartNode = (ANavigationPoint *)(straightPath.Start);
ANavigationPoint* EndNode = (ANavigationPoint *)(straightPath.End);
//debugf("Prune reachspec %d from %s to %s because of %s", straightPathIndex,
// StartNode->GetName(), EndNode->GetName(), NavNode->GetName());
while ( (j<15) && (StartNode->Paths[j] != straightPathIndex) )
j++;
if ( StartNode->Paths[j] == straightPathIndex )
{
while ( (j<15) && (StartNode->Paths[j] != -1) )
{
StartNode->Paths[j] = StartNode->Paths[j+1];
j++;
}
StartNode->Paths[15] = -1;
}
j=0;
while ( (j<15) && (StartNode->PrunedPaths[j] != -1) )
j++;
StartNode->PrunedPaths[j] = straightPathIndex;
Level->ReachSpecs(straightPathIndex).bPruned = 1;
j=0;
while ( (j<15) && (EndNode->upstreamPaths[j] != straightPathIndex) )
j++;
if ( EndNode->upstreamPaths[j] == straightPathIndex )
{
while ( (j<15) && (EndNode->upstreamPaths[j] != -1) )
{
EndNode->upstreamPaths[j] = EndNode->upstreamPaths[j+1]; //Relocating with forward Specs
j++;
}
EndNode->upstreamPaths[15] = -1; //Last will be always -1
}
// Note that all specs remain in reachspec list and still referenced in PrunedPaths[]
// but removed from visible Navigation graph:
}
}
n++;
}
i++;
}
return pruned;
unguard;
}
Inventories are another subject here and they definitely are linked with related InventorySpot. But ReachSpecs here are messed up.
Notes: XC_EditorAdds from XC v25a is targeting UT469a, it will not deal normally in UT469b. For UT469b XC used must be XC v25b. Here in UT469b I did not investigate many details because... that Editor is crashing often during inspection of various lists elements and toggling ViewPorts, which doesn't happen for me in any 436 440 version not having these extra (bugged) features.
Shortly, XC builder version which you were using is not for that UT Editor version or... it's bugged.
Edit: Let's look at something - PlayerStart24 vs VehicleExit0 (What does that Node ?)
Code: Select all
InputDescribeSpec: Reading ReachSpec 3514
Out: Paths[5]-Index 3514
Start= PlayerStart24
End= VehicleExit0
Radius=70
Height=70
Flags=9
Dist=792 UU
Pruned=1.
This path named 3514 cannot be seen but... is there and is not in PrunedPaths, it is placed in Paths from PlayerStart24 and upStreamPaths from VehicleExit0 which is not what Engine was intended to do and I don't know why was placed this way. I'm not sure if I need to setup a fix for such a scenario as long as map looks really overloaded and paths can be simplified and created correctly from byte zero.