Game Development Community

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()...

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.


#1
02/27/2007 (7:07 am)
Hey, I was wondering about that, it didn't seem right. Nice fix Tom!
#2
03/01/2007 (5:37 pm)
Thanks again Tom.

You going to GDC? I think I owe you a beer or two ;)
#3
03/01/2007 (6:31 pm)
@Mark - Thanks!

@Brian - Yea... i'll be there.