forked from Mirrorlandia_minetest/minetest
Decrease sneak margin to combat phasing through thin walls (#13607)
A 1/16th-node-thick wall is 0.625 meters thick, and the previous margin of 0.1 meters meant that these walls could be phased through by sneaking against them. A margin lower than 0.625 prevents this.
This commit is contained in:
parent
2061984313
commit
9b310a6e6f
@ -60,7 +60,9 @@ bool LocalPlayer::updateSneakNode(Map *map, const v3f &position,
|
|||||||
const v3f &sneak_max)
|
const v3f &sneak_max)
|
||||||
{
|
{
|
||||||
// Acceptable distance to node center
|
// Acceptable distance to node center
|
||||||
constexpr f32 allowed_range = (0.5f + 0.1f) * BS;
|
// This must be > 0.5 units to get the sneak ladder to work
|
||||||
|
// 0.05 prevents sideways teleporting through 1/16 thick walls
|
||||||
|
constexpr f32 allowed_range = (0.5f + 0.05f) * BS;
|
||||||
static const v3s16 dir9_center[9] = {
|
static const v3s16 dir9_center[9] = {
|
||||||
v3s16( 0, 0, 0),
|
v3s16( 0, 0, 0),
|
||||||
v3s16( 1, 0, 0),
|
v3s16( 1, 0, 0),
|
||||||
|
Loading…
Reference in New Issue
Block a user