pfacing() forces player to leave vehicle
LadyCailinBot opened this issue ยท 5 comments
CMDHELPER-3065 - Reported by Murreey
Changing the direction a player is facing while they're in a vehicle forces them out of it.
Not sure if this is intentional or not, but I couldn't find anything about it.
Comment by PseudoKnight
pfacing() teleports the player. So it also resets their local position to server-side position when the function is called. Sadly, this is a dependency limitation and not a CommandHelper bug.
Comment by PseudoKnight
Actually, this should be mentioned in the documentation for pfacing.
Comment by Pieter12345
I wrote a fix that re-sets the player in the vehicle after the teleport. I'll make a pull req later today.
Comment by Pieter12345
Fixed in:
#300
Comment by PseudoKnight
I'm usually wary of this kind of hand-holding. Not sure how I feel about this one. This is now going to create vehicle enter / leave events unexpectedly -- shifted the problem. Did you test if this even works when you're in a vehicle? It might not even change your facing, especially if you're on a horse.