Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Problem with rotation

Newbie Spellweaver
Joined
Aug 16, 2017
Messages
84
Reaction score
34
Does anyone know how the dbo client sends the rotation to the server? , the problem is that if the value is in a range less than PI, the value is correct even though the value is between PI, but if the value is greater than PI, then the value is enclosed within 315 degress and 400 degress more or less.
 
Initiate Mage
Joined
Jun 11, 2014
Messages
2
Reaction score
5
This is how you get direction from client:
Code:
struct VectorNtlShort{
    SHORT x;    
    SHORT y;    
    SHORT z;    
    
    void getVector3Ntl(Vector3Short &vector) const {        
        SHORT newX = x & 0x3FFF ^ 0x3FFF;        
        vector.x = static_cast<SHORT>((x & (1 << 15) ? -newX : x) / 10000.f);        
        SHORT newY = y & 0x3FFF ^ 0x3FFF;        
        vector.y = static_cast<SHORT>((y & (1 << 15) ? -newY : y) / 10000.f);
        SHORT newZ = z & 0x3FFF ^ 0x3FFF; 
        vector.z = static_cast<SHORT>((z & (1 << 15) ? -newZ : z) / 10000.f);   
    }
}
Client sometimes want same weird format back. "Encrypted" direction should have values -1 ~ +1
 
Newbie Spellweaver
Joined
Aug 16, 2017
Messages
84
Reaction score
34
How did you know that the client encrypted the direction?
 
Back
Top