summaryrefslogtreecommitdiff
path: root/src/player.h
diff options
context:
space:
mode:
authorHybridDog <ovvv@web.de>2016-01-04 17:21:33 +0100
committerparamat <mat.gregory@virginmedia.com>2016-03-14 08:44:28 +0000
commitc0b6986e3875e6f42682c78fd5db0080a7bae651 (patch)
treebc03d65ada090bb6538e55912be1398a2918b3d8 /src/player.h
parent5a40a7dad8cbf46320c3b5dd1122808eb4919b62 (diff)
downloadminetest-c0b6986e3875e6f42682c78fd5db0080a7bae651.tar.gz
minetest-c0b6986e3875e6f42682c78fd5db0080a7bae651.tar.bz2
minetest-c0b6986e3875e6f42682c78fd5db0080a7bae651.zip
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
Diffstat (limited to 'src/player.h')
-rw-r--r--src/player.h1
1 files changed, 1 insertions, 0 deletions
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;