I think the server does not always know which direction a player is facing.
server-side: player's facing direction is based on the last direction they walked
client-side: after you stop walking, you can shift-click to face a different direction, but this change is not sent to the server
To demonstrate, use a Soul Linker:
- walk north
- stop walking
- use Shift-click to face south
- use High Jump
--> you'll jump in the North direction but still be facing south on your client
This is where it's stored, hope it helps:
(unit_data for facing direction, and map_session_data for head direction)
#define pc_setdir(sd,b,h) ( (sd)->ud.dir = ( ,(sd)->head_dir = (h) )