Pocketmine-mp: Vertical movement more than 10 blocks triggers movement anti-cheat

Created on 13 Oct 2016  路  11Comments  路  Source: pmmp/PocketMine-MP

Issue description

When a player climbs a high tower with ladders, its being dragged back. This also happens when anti flight is disabled, and in creative mode.

Steps to reproduce the issue

  1. Build a really high tower with ladders (at least 30 blocks (for safety that it happens))
  2. Climb the ladder. you麓ll be dragged back on the ground (note that it will not instantly happen, you麓ll have to climb some blocks.

OS and versions

  • PocketMine-MP: github master (commit 2fba1073ddf4965eb5d2bbbbbfb4a5c5f9377db3)
  • PHP: 7.0.11
  • OS: Windows 10 Pro

Crashdump, backtrace or other files


none

Gameplay Fixed

Most helpful comment

I blame Shoghi.

All 11 comments

im having the same problem!

This would appear to be a movement-check bug, but since I can't reproduce it, it's hard to say.

Reason: Player's bounding box doesn't collide with Ladder's bounding box server side. Due to being in a free space/air part of the ladder, the server thinks you are flying.
If you make the AxisBB of the ladder bigger, it all works fine.
https://github.com/ClearSkyTeam/ClearSky/commit/c103fcb1ecf0a15492612d4e684e67a7912cc190

:facepalm: if it thought you were flying, this wouldn't be the case:

This also happens when anti flight is disabled, and in creative mode.

Found the _actual_ bug this time. Let's all take a moment to #blame @shoghicp.

Vertical movement less than 2.3 blocks at once is treated as zero. Of course, while you are climbing a ladder you are _continuously moving smaller amounts_ than this, so the server thinks you are not moving. Once you travel 10 blocks, the anti-cheat kicks in, thinking you have moved more than 10 blocks in a single tick.

This is also the cause of the infamous pull-back bug in spectator mode when flying through blocks.

Forget the 2.3 thing, this line is so badly wrong that it will affect _all_ heights. Unbelievable.

https://github.com/pmmp/PocketMine-MP/blame/mcpe-1.0/src/pocketmine/Player.php#L1377

@jojoe77777 no, that made related bugs worse.

I blame Shoghi.

Fixed in #259

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mal0ne-23 picture mal0ne-23  路  17Comments

jarne picture jarne  路  20Comments

L3ice picture L3ice  路  21Comments

MisteFr picture MisteFr  路  19Comments

KAGsundaram picture KAGsundaram  路  43Comments