Game Development Community

1.5.1 Saving with Absolute Paths

by Deozaan · in Torque Game Builder · 08/03/2007 (1:00 pm) · 1 replies

I've noticed two strange things while creating/saving a level with a 3D shape in it.

The first thing is that TGB saves the absolute path (instead of the relative path) to the dts file in the .t2d level file. The other thing is that it seems to insert an extra backslash in the path somewhere along the lines. So for example, the path might look like this:

C:\TGB\games\project\data\shapes\\soldier\soldier.dts

instead of the more appropriate:

~\data\shapes\soldier\soldier.dts

The end result is that when I build the project and run it, the 3D shape does not show up. I have to manually edit the t2d file in a text editor to change the path to the DTS for it to work properly.

#1
08/20/2007 (10:03 am)
Denozaan,
Thanks for the report. This bug is caused by the improper field typing of the 'Shape' field that hold the file name to the shape. This bug has been fixed and will be available when the next release is published.

If you have a Pro license, you may recompile your binaries changing line (1367) in t2dShape3D.cc from the following.

addProtectedField("shape", TypeString, Offset(mShapeFile, t2dShape3D), &setShape, &defaultProtectedGetFn, "");

to

addProtectedField("shape", TypeFilename, Offset(mShapeFile, t2dShape3D), &setShape, &defaultProtectedGetFn, "");

This would fix your issue.

Cheers,
-Justin