mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
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
This commit is contained in:
parent
5a40a7dad8
commit
c0b6986e38
4 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue