I've spent some time looking at this and it appears to be a timing issue.
I.e., we call $Client->SetHeading(0), but then the server receives an update packet from the client with it's current x,y,x location and heading, so we set the heading back to what it was.
Even if I call $client->SendPosUpdate(2) after $client->SetHeading, the server receives a packet from the client with the old heading.
I assume the client is sending updates faster when moving, which is why the problem is seen using EVENT_ENTER and not using EVENT_SAY (when the client is typically standing still to hail the NPC).
I can't think of any easy workaround, other than to set a flag indicating that the client is about to zone and ignoring any client update packets if that flag is set.
|