Skip to content

Client code determing if player is inside climbable block or standing on top of disable_jump block is inconsistent #16813

@yl-whosit

Description

@yl-whosit

Luanti version

Luanti 5.14.0 (Windows)
Using LuaJIT 2.1.1736781742
Built by Clang 20.1
Running on Windows/10.0.22000 x86_64
BUILD_TYPE=Release
RUN_IN_PLACE=1
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="."
STATIC_LOCALEDIR="locale"

Operating system and version

Win11 (pretty sure linux works same)

CPU model

No response

GPU model

No response

Active renderer

No response

Summary

Depending on how you end up standing on top of the block, your Y position seems to differ slightly, which causes some inconsistency, it's noticeable when you're standing on top of groups = {disable_jump=1} node, but inside climbable = true node.

Steps to reproduce

A player reported that they sometimes can't climb a rope that they normally could.
Here's the construction:

Image

Light-colored blocks at the bottom are groups = {disable_jump=1}, rope is climbable = true.
When you walk up the left-hand stairs and try to climb the rope, you can't - because you can't jump.
When you walk from the right side, after jumping on top of same blocks or the stone floor nearby - you can climb the rope.

I tried investigating this by checking my position with core.chat_send_player('singleplayer', string.format("Your Y: %s", core.get_player_by_name('singleplayer'):get_pos().y)) (you must use .y instead of dump(), because dumping seems to round the numbers...)

When I jump and land on a block, my Y gets set to -2.499 - client considers player being inside a climbable node and allows climbing.
If I walk up the stairs from below, my Y is exactly -2.5 - client considers player standing on a disable_jump node and it's impossible to climb a climbable node directly above.

It may be significant that this particular setup has Y coordinate below zero (-2.5 when standing on the floor at the bottom of the rope).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions