mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-23 06:04:44 +00:00
constrain player mRot.z reguardless of translation
This commit is contained in:
parent
9486587014
commit
c3eb5e028b
|
|
@ -6365,15 +6365,11 @@ U32 Player::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
|||
if(len > 8191)
|
||||
len = 8191;
|
||||
stream->writeInt((S32)len, 13);
|
||||
|
||||
// constrain the range of mRot.z
|
||||
while (mRot.z < 0.0f)
|
||||
mRot.z += M_2PI_F;
|
||||
while (mRot.z > M_2PI_F)
|
||||
mRot.z -= M_2PI_F;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// constrain the range of mRot.z
|
||||
mWrapF(mRot.z, 0.0f, M_2PI_F);
|
||||
|
||||
stream->writeFloat(mRot.z / M_2PI_F, 7);
|
||||
stream->writeSignedFloat(mHead.x / (mDataBlock->maxLookAngle - mDataBlock->minLookAngle), 6);
|
||||
stream->writeSignedFloat(mHead.z / mDataBlock->maxFreelookAngle, 6);
|
||||
|
|
|
|||
Loading…
Reference in a new issue