diff --git a/ryzom/client/src/user_entity.cpp b/ryzom/client/src/user_entity.cpp index 0fc3546ed..375f521b3 100644 --- a/ryzom/client/src/user_entity.cpp +++ b/ryzom/client/src/user_entity.cpp @@ -187,6 +187,8 @@ CUserEntity::CUserEntity() _MoveToDist= 0.0; _MoveToColStartTime= 0; + _LastSentClientTick = 0; + _FollowForceHeadPitch= false; _ForceLookSlot= CLFECOMMON::INVALID_SLOT; @@ -1705,6 +1707,10 @@ void CUserEntity::moveToAction(CEntityCL *ent) //----------------------------------------------- bool CUserEntity::sendToServer(CBitMemStream &out) { + if (NetMngr.getCurrentClientTick() == _LastSentClientTick) + { + return false; + } if(GenericMsgHeaderMngr.pushNameToStream("POSITION", out)) { // Backup the position sent. @@ -1717,6 +1723,7 @@ bool CUserEntity::sendToServer(CBitMemStream &out) positionMsg.Z = (sint32)(pos().z * 1000); positionMsg.Heading = frontYaw(); out.serial(positionMsg); + _LastSentClientTick = NetMngr.getCurrentClientTick(); return true; } else diff --git a/ryzom/client/src/user_entity.h b/ryzom/client/src/user_entity.h index 0155d013b..8c267cd2f 100644 --- a/ryzom/client/src/user_entity.h +++ b/ryzom/client/src/user_entity.h @@ -606,6 +606,8 @@ protected: /// Time in MS when the User started beiing in collision with anything that avoid him to do an Action (and still is). sint64 _MoveToColStartTime; + NLMISC::TGameCycle _LastSentClientTick; + /// CSkill points observer class CSkillPointsObserver : public NLMISC::ICDBNode::IPropertyObserver