Game Development Community

Enable In Game Editing of TSE Water

by Josh Moore · 09/27/2005 (3:23 pm) · 3 comments

Enable in game editing of TSE water by setting the InitialUpdateMask in inspectPostApply.

In waterBlock.h, after:
void unpackUpdate(NetConnection *conn,           BitStream *stream);
Add:
void inspectPostApply();

Then in waterBlock.cpp, add this anywhere you want(I stuck it at the end of the file):
void WaterBlock::inspectPostApply()
{
   if(isServerObject()) {
      setTransform(getTransform());
      setScale(getScale());
		setMaskBits(InitialUpdateMask);
   }
}

#1
09/27/2005 (9:58 pm)
Ah is this why the editor always resets my waterblock coords?
#2
10/10/2005 (3:48 pm)
Great! I tried it today, just what i needed :)
#3
12/03/2005 (9:41 am)
perfect resource! just the one I needed! ;)

Thanks

EDIT:
P.S. surely need to be in HEAD