Skip to content

place blocks inside you while airborne and crouched [bug] #1102

Description

@VierEck
twodaybugdemo.mp4

normally since the player jumps only 1 block high, and additionally "pulls their legs up" via crouching mid-air, the player should only be able to place a block beneath them 2 blocks higher from where they jumped off. this bug however enables the player to place a block 3 blocks higher from where they jumped.
this is not possible on voxlap. it gives openspades players an advantage.
some players have practiced this exploit and use it with great efficiency. not only is this faster than scaling the wall normally but u also save up a lot of blocks since u use less blocks in order to scale the same height.

bool Player::OverlapsWith(const spades::AABB3 &aabb) {
SPADES_MARK_FUNCTION_DEBUG();
float offset, m;
if (input.crouch) {
offset = .45f;
m = .9f;
} else {
offset = .9f;
m = 1.35f;
}
m -= .5f;
AABB3 playerBox(eye.x - .45f, eye.y - .45f, eye.z, .9f, .9f, offset + m);
return aabb && playerBox;
}

in line 1471 depth ("player height") is offset + m

when crouched offset = 0.45 and m = 0.9
however in line 1470 m is always subtracted by 0.5

so in 1471 playerBox depth (player height) when crouched is assumed to be 0.45 + 0.9 - 0.5 = 0.85
this is wrong. playerBox depth when standing is also wrong (0.9 + 1.35 - 0.5 = 1.75)

i measured the z coordinate of eye in different situations:
highest point of a jump from a standing position at ground level, eye.z = 58.146641
highest point of a jump from a crouched position at ground level, eye.z = 59.041550

58.146641 + 0.85 = 58.996641 -> 58.996641 < 59
59.041550 + 0.85 = 59.891550 -> 59.891550 < 59
in both cases the hitbox doesnt extend down to 59 allowing the player to place a block inside themselve at torso height.

assuming eye is the camera position, playerBox also doesnt account for "the upper half" of the player's head since the camera is positioned at the center of the head.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions