mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merged and updated to latest PTR build 9704
This commit is contained in:
commit
a2d3941588
22 changed files with 376 additions and 454 deletions
|
|
@ -585,22 +585,7 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags, uint32 flags2
|
|||
// 0x200
|
||||
if(flags & UPDATEFLAG_UNK2)
|
||||
{
|
||||
// may be precalculate it?
|
||||
int64 rotation = 0;
|
||||
float ang = ((WorldObject *)this)->GetOrientation();
|
||||
|
||||
float f_rot1 = sin(ang / 2.0f);
|
||||
int64 i_rot1 = f_rot1 / atan(pow(2.0f, -20.0f));
|
||||
rotation |= (i_rot1 << 43 >> 43) & 0x00000000001FFFFF;
|
||||
|
||||
//float f_rot2 = sin(0.0f / 2.0f);
|
||||
//int64 i_rot2 = f_rot2 / atan(pow(2.0f, -20.0f));
|
||||
//rotation |= (((i_rot2 << 22) >> 32) >> 11) & 0x000003FFFFE00000;
|
||||
|
||||
//float f_rot3 = sin(0.0f / 2.0f);
|
||||
//int64 i_rot3 = f_rot3 / atan(pow(2.0f, -21.0f));
|
||||
//rotation |= (i_rot3 >> 42) & 0x7FFFFC0000000000;
|
||||
*data << uint64(rotation);
|
||||
*data << uint64(((GameObject*)this)->GetRotation());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue