diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index c0a3e167d..241e8f269 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -2024,7 +2024,7 @@ int CLuaIHMRyzom::getIslandId(CLuaState &ls) // *************************************************************************** // -// addShape("shape", x, y, z, "angle", scale, collision?) +// addShape("shape", .x, .y, .z, "angle", .scale, collision?, "context", "url", highlight?, transparency?, "texture", "skeleton") // //******** int CLuaIHMRyzom::addShape(CLuaState &ls) diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 42285a167..2742edeff 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -1404,12 +1404,19 @@ void impulseCorrectPos(NLMISC::CBitMemStream &impulse) if(UserEntity->mode() != MBEHAV::COMBAT_FLOAT) { - // Compute the destination. - CVectorD dest = CVectorD((float)x/1000.0f, (float)y/1000.0f, (float)z/1000.0f); - // Update the position for the vision. - NetMngr.setReferencePosition(dest); - // Change the user poisition. - UserEntity->correctPos(dest); + if (x == 0) // Get SpeedAdjustement + { + UserEntity->setSpeedServerAdjust((float)y/1000.0f); + } + else + { + // Compute the destination. + CVectorD dest = CVectorD((float)x/1000.0f, (float)y/1000.0f, (float)z/1000.0f); + // Update the position for the vision. + NetMngr.setReferencePosition(dest); + // Change the user poisition. + UserEntity->correctPos(dest); + } } }// impulseCorrectPos // diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index cad200aeb..7ae8cec5d 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -1218,6 +1218,7 @@ void CUserEntity::applyMotion(CEntityCL *target) // don't increase speed clamp(modif, 0.0, 1.0); speed *= modif; + speed *= _SpeedServerAdjust; // Move _HasMoved = true; _Primitive->move(speed, dynamicWI); @@ -1227,6 +1228,7 @@ void CUserEntity::applyMotion(CEntityCL *target) // Third Person View else { + speed *= _SpeedServerAdjust; speed += pos(); sint64 x = (sint64)((sint32)(speed.x * 1000.0)); sint64 y = (sint64)((sint32)(speed.y * 1000.0)); @@ -1243,6 +1245,9 @@ void CUserEntity::applyMotion(CEntityCL *target) mount->_Stages.addStage(NetMngr.getCurrentClientTick()+time, CLFECOMMON::PROPERTY_POSZ, z); } } + + _SpeedServerAdjust += 0.05; + clamp(_SpeedServerAdjust, 0.8, 1.0); }// applyMotion // diff --git a/code/ryzom/client/src/user_entity.h b/code/ryzom/client/src/user_entity.h index 7e693536b..fc6d56ea1 100644 --- a/code/ryzom/client/src/user_entity.h +++ b/code/ryzom/client/src/user_entity.h @@ -297,6 +297,8 @@ public: // get the velocity vector of the entity NLMISC::CVector getVelocity() const; + inline void setSpeedServerAdjust(float speed) {_SpeedServerAdjust = speed;} + /// Check if the mount is able to run, and force walking mode if not void checkMountAbleToRun(); @@ -423,6 +425,7 @@ public: void tp(const NLMISC::CVectorD &dest); /// Teleport the player to correct his position. void correctPos(const NLMISC::CVectorD &dest); + /// Skill Up void skillUp(); /// get the level of the player (max of all skills) @@ -545,6 +548,8 @@ protected: /// Velocity : Front and Lateral float _FrontVelocity; float _LateralVelocity; + /// Speed adjustement from gpms + float _SpeedServerAdjust; /// Head Pitch double _HeadPitch; /// Height of the eyes (camera).