Bizarre CameraData bug
by Sam Redfern · in Torque Game Engine · 08/08/2006 (5:18 pm) · 1 replies
I've just spent the last several hours trying to uncover why my TGE game client has been crashing, since the only changes I made recently were some superficial scripting ones.
A bit of digging lead me to the exact same problem described here:
http://www.garagegames.com/mg/forums/result.thread.php?qt=16762
Basically, the client is unable to find the Observer datablock for its camera.
So then I listed all datablocks on the client, and it turns out the standard 'Observer' CameraData block was not there. I hadn't ever changed that, so it's a bit strange. So it turns out (as far as I can see) if this CameraData block is the very first block instantiated on the server, it (bizarrely) is not sent to the clients. I switched around the order of the .cs files exec'd in the onServerCreated() function in game.cs, and hey presto, it was fixed. It's not as if the first datablock from the file I switched in before it went missing then, though, the problem is specific to CameraData.
Can anyone else try this out...?
A bit of digging lead me to the exact same problem described here:
http://www.garagegames.com/mg/forums/result.thread.php?qt=16762
Basically, the client is unable to find the Observer datablock for its camera.
So then I listed all datablocks on the client, and it turns out the standard 'Observer' CameraData block was not there. I hadn't ever changed that, so it's a bit strange. So it turns out (as far as I can see) if this CameraData block is the very first block instantiated on the server, it (bizarrely) is not sent to the clients. I switched around the order of the .cs files exec'd in the onServerCreated() function in game.cs, and hey presto, it was fixed. It's not as if the first datablock from the file I switched in before it went missing then, though, the problem is specific to CameraData.
Can anyone else try this out...?
About the author
Torque Owner Sam Redfern