RC2 bug in datablock.cs writing bad info
by Patrick Shaw · in Torque Game Builder · 06/10/2006 (5:05 am) · 1 replies
I started with this in my datablock.cs -
new t2dSceneObjectDatablock(basicBlocksDatablock) {
...
CollisionPolyList = " -1 -1 1 -1 1 1 -1 1";
...
};
After running my game multiple times, that line becomes:
CollisionPolyList = " -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 1 1 1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 -1 -1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 -1 -1 -1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1";
Which causes a buffer overrrun.
As a quick fix, is there a way of disabling the datablock.cs autosave?
new t2dSceneObjectDatablock(basicBlocksDatablock) {
...
CollisionPolyList = " -1 -1 1 -1 1 1 -1 1";
...
};
After running my game multiple times, that line becomes:
CollisionPolyList = " -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 1 1 1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 -1 -1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 -1 -1 -1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1";
Which causes a buffer overrrun.
As a quick fix, is there a way of disabling the datablock.cs autosave?
About the author
Torque 3D Owner Patrick Shaw
new t2dSceneObjectDatablock(basicDatablock) { CollisionPolyList = " -1 -1 1 -1 1 1 -1 1"; } new t2dSceneObjectDatablock(bulletGeneric : basicDatablock) { // no CollisionPolyList field specified } new t2dSceneObjectDatablock(bulletLaser : bulletGeneric ) { // no CollisionPolyList field specified }However, when I run the game, the datablocks have the following polylists
basicDatablock " 1 1 -1 1 -1 -1 1 -1" [8 values]
bulletGeneric " 1 1 1 1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 -1 -1 1 -1 1 1 -1 1 -1 -1 -1" [28 values]
bulletLaser " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 1 1 1 1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 1 1 1 1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1" [~110 values]