mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Removed hard coded directory paths
- Removed references to core directory. - Switch some references to tools directory - Added preferences variables where appropriate
This commit is contained in:
parent
853b70255b
commit
4b1334db9f
25 changed files with 75 additions and 18 deletions
|
|
@ -50,8 +50,13 @@ ConsoleStaticMethod( TerrainBlock, createNew, S32, 5, 5,
|
|||
// rename it themselves in their file browser. The main reason for this is so we can easily increment for ourselves;
|
||||
// and because its too easy to rename the terrain object and forget to take care of the terrain filename afterwards.
|
||||
FileName terrFileName( Con::getVariable("$Client::MissionFile") );
|
||||
terrFileName.replace("tools/levels/", "art/terrains/");
|
||||
terrFileName.replace("levels/", "art/terrains/");
|
||||
String terrainDirectory( Con::getVariable( "$pref::Directories::Terrain" ) );
|
||||
if ( terrainDirectory.isEmpty() )
|
||||
{
|
||||
terrainDirectory = "art/terrains/";
|
||||
}
|
||||
terrFileName.replace("tools/levels/", terrainDirectory);
|
||||
terrFileName.replace("levels/", terrainDirectory);
|
||||
|
||||
TerrainFile::create( &terrFileName, resolution, materials );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue