*Fix the bug that player turn is not updated in server side.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-18 20:53:32 -05:00
parent 8397da15e5
commit e5d56a23d4

View File

@@ -5646,10 +5646,12 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
// mover->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TURNING);
//AURA_INTERRUPT_FLAG_JUMP not sure
if(GetOrientation() != orientation)
bool turn = (GetOrientation() != orientation);
bool move2d = (teleport || GetPositionX() != x || GetPositionY() != y);
if(turn)
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TURNING);
bool move2d = (teleport || GetPositionX() != x || GetPositionY() != y);
if(move2d || GetPositionZ() != z)
{
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MOVE);
@@ -5669,6 +5671,10 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
CheckExploreSystem();
}
else if(turn)
{
SetOrientation(orientation);
}
return true;
}