From a879ad4dcf87e032f219a3150468c9e291f8073f Mon Sep 17 00:00:00 2001 From: Azaezel Date: Tue, 7 Apr 2015 19:19:38 -0500 Subject: [PATCH] re-enables prior functionality allowing folks to post-editor modify terrain cached textures. --- Engine/source/terrain/terrData.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Engine/source/terrain/terrData.cpp b/Engine/source/terrain/terrData.cpp index f33e32340..b09f0ae73 100644 --- a/Engine/source/terrain/terrData.cpp +++ b/Engine/source/terrain/terrData.cpp @@ -288,7 +288,11 @@ bool TerrainBlock::_setBaseTexFormat(void *obj, const char *index, const char *d terrain->mBaseTexFormat = (BaseTexFormat)eTable[i].mInt; terrain->_updateMaterials(); terrain->_updateLayerTexture(); - terrain->_updateBaseTexture(true); + // If the cached base texture is older that the terrain file or + // it doesn't exist then generate and cache it. + String baseCachePath = terrain->_getBaseTexCacheFileName(); + if (Platform::compareModifiedTimes(baseCachePath, terrain->mTerrFileName) < 0) + terrain->_updateBaseTexture(true); break; } }