Waterblock mission editor bug
by Tom Spilman · in Torque Game Engine Advanced · 02/26/2007 (9:40 pm) · 3 replies
In TGEA 1.0 if you try to change the waterblock position via the Mission Editor Inspector window the client side block doesn't move to the new location. To fix this the transform must be set from within Waterblock::unpackUpdate()...
That's it!
void WaterBlock::unpackUpdate(NetConnection* con, BitStream* stream)
{
Parent::unpackUpdate(con, stream);
stream->read( &mGridElementSize );
if( stream->readFlag() )
{
mathRead( *stream, &mObjScale );
// NEW CODE
MatrixF mat;
stream->readAffineTransform( &mat );
setTransform(mat);
// NEW CODE
mFullReflect = stream->readFlag();
mRenderFogMesh = stream->readFlag();That's it!
About the author
Tom is a programmer and co-owner of Sickhead Games, LLC.
Torque 3D Owner Mark Dynna