CommandHelper

CommandHelper

46.5k Downloads

pfacing() forces player to leave vehicle

LadyCailinBot opened this issue ยท 5 comments

commented

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.

commented

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.

commented

Comment by PseudoKnight

Actually, this should be mentioned in the documentation for pfacing.

commented

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.

commented

Comment by Pieter12345

Fixed in:
#300

commented

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.