New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
player:setpos and player:moveto do not really teleport player when player is sneaking #2876
Labels
Comments
Does the problem happen to player:moveto(pos), too? |
This probably because we keep a reference to the node the player is standing on in the player object. It may be fixable by setting |
PilzAdam
added
Bug
Issues that were confirmed to be a bug
@ Server / Client / Env.
labels
Jul 9, 2015
Yes. |
Wuzzy2
changed the title
player:setpos does not really teleport player when player is sneaking
player:setpos and player:moveto do not really teleport player when player is sneaking
Jul 9, 2015
HybridDog
added a commit
to HybridDog/minetest
that referenced
this issue
Feb 2, 2016
Only set back position when sneaking if player wasn't teleported by adding and using a bool "got_teleported" to player it fixes minetest#2876
3535 is merged, hopefully this is fixed. |
Thank you for this merge. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you use
player:setpos(some_position)
orplayer:moveto(some_position)
on the player objectplayer
, the player is not really set tosome_position
under these conditions:The player won't be teleported to the destination, instead the player is just moved to the edge of the node on which the player is currently standing, but interestingly, this is always towards the direction of the destination.
One way to quickly test this is by using the Mirror of Returning (https://forum.minetest.net/viewtopic.php?f=11&t=11224) or Point Teleporter (https://forum.minetest.net/viewtopic.php?f=11&t=9629).
Both mods directly call
setpos
when you use the item.I think this is very unexpected for modders, it also seems to me the modder has zero chance to somehow “overwrite” this behaviour or to ignore the sneaking.
Tested in: 0.4.12
The text was updated successfully, but these errors were encountered: