OldUnreal / UnrealTournamentPatches

Other
972 stars 29 forks source link

[469b] Commands for debug Navigation network not descriptive #382

Open SeriousBuggie opened 3 years ago

SeriousBuggie commented 3 years ago

For debug Navigation network exists only two command from the box: RememberSpot - for remember current destination. ShowPath - for show nearest NavigationPoint which lead you to remember spot.

RememberSpot Remember your current location (see ShowPath below). ShowPath Show the recommended path back to location remembered by RememberSpot.

Problem consist in ShowPath output. https://github.com/Slipyx/UT99/blob/f2ebd703845075a2d667e8e3f2f71a5e7f187610/Engine/PlayerPawn.uc#L3168

exec function ShowPath()
{
    //find next path to remembered spot
    local Actor node;
    if (!bAdmin && Level.NetMode == NM_DedicatedServer)
        return;
    node = FindPathTo(Destination);
    if (node != None)
    {
        log("found path");
        Spawn(class 'WayBeacon', self, '', node.location);
    }
    else
        log("didn't find path");
}

If we found the path, then we spawn marker and write to log "found path". But if we not found path, by any of thousand reasons, we just get "didn't find path" message which absolutely undescriptive what really happen. We can fail by:

  1. No NavigationPointList on LevelInfo.
  2. No ReachSpecs on Level.
  3. No find visible paths from current location into navigation network.
  4. No find visible paths from goal location into navigation network.
  5. Not able travel actor inside navigation network.
  6. Thousand of other reasons...

But in all cases we get just "didn't find path" which not enough. So I suggest provide clear message which describe on which place path search failed.

Currently this is look like magic: you do some actions and prey its solve broken navigation network usage.

SeriousBuggie commented 2 months ago

FindPathTo can dump into log real reason if destination is RememberSpot.