Camera::readPacketData compression point problem
by Jim Rowley · in Torque Game Engine · 02/07/2004 (2:57 am) · 1 replies
Hello all.
I believe there is a bug with Camera::readPacketData setting the compression point used for transmitting OrbitPointMode in the wrong place. In the code writePacketData sets the compression point and then transmits a compressed point, whereas readPacketData is FIRST reading the compressed point and then setting the compression point.
In my project this was noticeable when onDeath puts the camera into "corpse" mode, and then the corpse is deleted after a period of time... Once the corpse was deleted, my orbiting camera position on clients was getting whacked out to some unitialized huge value.
I moved the line in readPacketData which sets the compression point to do it PRIOR to reading the compressed point, and my problems went away.
I believe there is a bug with Camera::readPacketData setting the compression point used for transmitting OrbitPointMode in the wrong place. In the code writePacketData sets the compression point and then transmits a compressed point, whereas readPacketData is FIRST reading the compressed point and then setting the compression point.
In my project this was noticeable when onDeath puts the camera into "corpse" mode, and then the corpse is deleted after a period of time... Once the corpse was deleted, my orbiting camera position on clients was getting whacked out to some unitialized huge value.
I moved the line in readPacketData which sets the compression point to do it PRIOR to reading the compressed point, and my problems went away.
Associate Kyle Carter