mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-22 08:03:45 +00:00
Enforces filename string case sensitivity for assets' internal filenames, which avoids the stringtable messing with the case preventing file name case sensitivity issues.
This commit is contained in:
parent
c04f3ae166
commit
cfe122f714
18 changed files with 109 additions and 102 deletions
|
|
@ -161,14 +161,14 @@ void TerrainAsset::initializeAsset()
|
|||
// Call parent.
|
||||
Parent::initializeAsset();
|
||||
|
||||
mTerrainFilePath = expandAssetFilePath(mTerrainFileName);
|
||||
mTerrainFilePath = getOwned() ? expandAssetFilePath(mTerrainFileName) : mTerrainFilePath;
|
||||
|
||||
loadTerrain();
|
||||
}
|
||||
|
||||
void TerrainAsset::onAssetRefresh()
|
||||
{
|
||||
mTerrainFilePath = expandAssetFilePath(mTerrainFileName);
|
||||
mTerrainFilePath = getOwned() ? expandAssetFilePath(mTerrainFileName) : mTerrainFilePath;
|
||||
|
||||
loadTerrain();
|
||||
}
|
||||
|
|
@ -176,13 +176,16 @@ void TerrainAsset::onAssetRefresh()
|
|||
void TerrainAsset::setTerrainFileName(const char* pScriptFile)
|
||||
{
|
||||
// Sanity!
|
||||
AssertFatal(pScriptFile != NULL, "Cannot use a NULL script file.");
|
||||
AssertFatal(pScriptFile != NULL, "Cannot use a NULL terrain file.");
|
||||
|
||||
// Fetch image file.
|
||||
pScriptFile = StringTable->insert(pScriptFile);
|
||||
pScriptFile = StringTable->insert(pScriptFile, true);
|
||||
|
||||
// Ignore no change,
|
||||
if (pScriptFile == mTerrainFileName)
|
||||
return;
|
||||
|
||||
// Update.
|
||||
mTerrainFileName = pScriptFile;
|
||||
mTerrainFileName = getOwned() ? expandAssetFilePath(pScriptFile) : pScriptFile;
|
||||
|
||||
// Refresh the asset.
|
||||
refreshAsset();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue