#JustTGEThings

Because it's not supposed to just work, right?


How to load a script for a given shape:

...
   // before loading shape, execute associated script
   char *ext = dStrstr( static_cast<char*>( fileBuffer ), const_cast<char*>( ".dts" ) );
   if (ext)
   {
      ext[1]='c';
      ext[2]='s';
      ext[3]='\0';
      Con::executef(2,"exec",fileBuffer);
      ext[1]='d';
      ext[2]='t';
      ext[3]='s';
   }
...

Oh God there's more.
Share the horrifying with this link.