Table of Contents

Class WaypointSceneAudit

Namespace
FishMMO.Server.Implementation.World.SceneServer
Assembly
FishMMO.Server.dll

Checks, once per loaded scene, that the waypoints the client can see are the waypoints the server can travel to.

public static class WaypointSceneAudit
Inheritance
WaypointSceneAudit
Inherited Members

Remarks

The map draws from the baked Waypoints; the server resolves a travel request from the live WaypointRegistry. They are keyed the same way, (scene, index), and nothing else ties them together. A waypoint added to a scene without a cache rebuild is discoverable on foot and then invisible on every map; a waypoint in the cache whose object no longer spawns is drawn and refused. Both are silent authoring drift, and the only place that holds both sides at once is a scene server that has just finished loading the scene.

The comparison is a pure function over the two index sets so it can be pinned by a test; the scene-server hook only gathers the inputs and logs the answer.

Methods

Audit(string, int, WorldSceneDetailsCache)

Runs the comparison for a scene that has finished loading and reports drift as errors.

public static bool Audit(string sceneName, int sceneHandle, WorldSceneDetailsCache cache)

Parameters

sceneName string

The scene's name, as the cache keys it.

sceneHandle int

The loaded scene's handle, as the registry keys it.

cache WorldSceneDetailsCache

The world scene details cache this server is running with.

Returns

bool

True when nothing is wrong.

Compare(IEnumerable<int>, IEnumerable<int>, List<int>, List<int>)

Compares the live and baked waypoint indices of one scene.

public static bool Compare(IEnumerable<int> live, IEnumerable<int> baked, List<int> liveOnly, List<int> bakedOnly)

Parameters

live IEnumerable<int>

Indices registered by spawned Waypoint objects.

baked IEnumerable<int>

Indices in the world scene details cache.

liveOnly List<int>

Live but not baked: the map will never draw them.

bakedOnly List<int>

Baked but not live: the map draws them and travel is refused.

Returns

bool

True when the two sets agree.