Table of Contents

Class CloudWorldLanding

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Where a character can be put down in a cloud world (SceneCloudWorld) and stay put: over an island, above the depth the deck takes whoever reaches it.

public static class CloudWorldLanding
Inheritance
CloudWorldLanding
Inherited Members

Remarks

Pure: a world's islands and a scene's cached details in, a place out. The server asks it whenever it is about to put a character somewhere in a cloud world it did not walk to: a respawn at a bind point, a resurrect of a body the deck has, an immortal character fished back out of it.

Why a bind point is asked about at all. Anywhere else a bind point is ground by construction, since a bindstone binds where the character stands. A cloud world's scene can be re-cut over an old one, and a bind point recorded on the old ground can be open air now; respawning there drops the character straight back into the deck, which kills it, which offers the same respawn again.

An island's reach is its outline's widest, so "over an island" is generous at a ragged edge. That is the right way to be wrong here: every authored place on an island passes, and only open air between islands fails.

Methods

Holds(SceneCloudWorld, Vector3)

True when point holds a character in world: at or above its death altitude and inside an island's reach. Always true outside a cloud world.

public static bool Holds(SceneCloudWorld world, Vector3 point)

Parameters

world SceneCloudWorld
point Vector3

Returns

bool

TryFind(SceneCloudWorld, WorldSceneDetails, Vector3, out RescuePoint)

The nearest authored place in the scene that Holds(SceneCloudWorld, Vector3): a respawn position first, since that is where a death goes, then an initial spawn position, then a waypoint.

public static bool TryFind(SceneCloudWorld world, WorldSceneDetails details, Vector3 from, out RescuePoint point)

Parameters

world SceneCloudWorld

The cloud world the character is in.

details WorldSceneDetails

The cached details of that scene.

from Vector3

Where the character is, or where it was going to be put.

point RescuePoint

The place found.

Returns

bool

Remarks

When nothing the scene authored holds, the nearest respawn position is returned anyway: a cut that put every respawn over open air is a broken cut, and the place it meant is still a better answer than the deck.

TryFind(Predicate<Vector3>, WorldSceneDetails, Vector3, out RescuePoint)

TryFind(SceneCloudWorld, WorldSceneDetails, Vector3, out RescuePoint) with what holds given as a test, so the choice can be exercised without a world.

public static bool TryFind(Predicate<Vector3> holds, WorldSceneDetails details, Vector3 from, out RescuePoint point)

Parameters

holds Predicate<Vector3>
details WorldSceneDetails
from Vector3
point RescuePoint

Returns

bool