Class CloudWorldLanding
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
worldSceneCloudWorldpointVector3
Returns
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
worldSceneCloudWorldThe cloud world the character is in.
detailsWorldSceneDetailsThe cached details of that scene.
fromVector3Where the character is, or where it was going to be put.
pointRescuePointThe place found.
Returns
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
holdsPredicate<Vector3>detailsWorldSceneDetailsfromVector3pointRescuePoint