From c0b6986e3875e6f42682c78fd5db0080a7bae651 Mon Sep 17 00:00:00 2001 From: HybridDog Date: Mon, 4 Jan 2016 17:21:33 +0100 Subject: Fix player teleportation bug whilst sneaking Only set back position when sneaking if player wasn't teleported by adding and using a bool "got_teleported" to player it fixes #2876 --- src/player.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/player.h') diff --git a/src/player.h b/src/player.h index 50267c72c..b317cda4f 100644 --- a/src/player.h +++ b/src/player.h @@ -318,6 +318,7 @@ public: // Use a function, if isDead can be defined by other conditions bool isDead() { return hp == 0; } + bool got_teleported; bool touching_ground; // This oscillates so that the player jumps a bit above the surface bool in_liquid; -- cgit v1.2.3