Fix for Issue #111 for BitStream Issues

This commit is contained in:
DavidWyand-GG 2012-11-05 16:50:54 -05:00
parent 70415d0787
commit 1a3501440f
7 changed files with 18 additions and 15 deletions

View file

@ -328,9 +328,9 @@ void Sim3DAudioEvent::pack(NetConnection *con, BitStream *bstream)
AssertFatal((1.0 - ((q.x * q.x) + (q.y * q.y) + (q.z * q.z))) >= (0.0 - 0.001),
"QuatF::normalize() is broken in Sim3DAudioEvent");
bstream->writeFloat(q.x,SoundRotBits);
bstream->writeFloat(q.y,SoundRotBits);
bstream->writeFloat(q.z,SoundRotBits);
bstream->writeSignedFloat(q.x,SoundRotBits);
bstream->writeSignedFloat(q.y,SoundRotBits);
bstream->writeSignedFloat(q.z,SoundRotBits);
bstream->writeFlag(q.w < 0.0);
}

View file

@ -96,7 +96,7 @@ void StdMoveList::clientWriteMovePacket(BitStream *bstream)
{
move[offset + i].sendCount++;
move[offset + i].pack(bstream,prevMove);
bstream->writeInt(move[offset + i].checksum,Move::ChecksumBits);
bstream->writeInt(move[offset + i].checksum & (~(0xFFFFFFFF << Move::ChecksumBits)),Move::ChecksumBits);
prevMove = &move[offset+i];
}
}