Teleport and climb destinations are never validated against collision #19
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
World.jump/2setsplayer.positionoutright. Nothing checks that the tile itlands on is standable, reachable, or even on a plane that exists as anything but
open air.
That is fine while every destination comes from the transport dump, and it is
not fine for the geometric fallback.
World.Climbing.Geometrycovers 380 of the749
{placement, action}pairs the dump never saw, at 96.7% plane-correct and53.6% exact — so roughly half of those staircases put the player on the wrong
tile, with no check that the tile is one a player could occupy.
The failure is worse than it sounds because of what upper planes look like in
the map data: no plane above 0 carries a single blocked-floor render flag in
the Lumbridge square, and the same holds broadly. Containment above ground is
walls and nothing else. A climb that lands outside a building at plane 1 drops
the player onto ~2,780 connected walkable tiles of open void, from which every
subsequent walk is legal, routes correctly, and looks exactly like the collision
map is broken.
Verified with a flood fill over the decoded flags for square 50,50: at plane 1
the castle rooms form 14 separate components and none of them connects to the
open-world component, so the only way to be out there is to have been put there.
Shape of a fix
travel/3should validate before committing:Collision.blocked?/1), orplacements the geometry is getting wrong.
Refusing is preferable to landing wrong: a staircase that does nothing is a bug
report, a staircase that puts the player inside the terrain is an afternoon.