|
@@ -197,7 +197,8 @@ TerrainBlock::TerrainBlock()
|
|
|
mBaseTexScaleConst( NULL ),
|
|
|
mBaseTexIdConst( NULL ),
|
|
|
mPhysicsRep( NULL ),
|
|
|
- mZoningDirty( false )
|
|
|
+ mZoningDirty( false ),
|
|
|
+ mUpdateBasetex ( true )
|
|
|
{
|
|
|
mTypeMask = TerrainObjectType | StaticObjectType | StaticShapeObjectType;
|
|
|
mNetFlags.set(Ghostable | ScopeAlways);
|
|
@@ -962,7 +963,7 @@ bool TerrainBlock::onAdd()
|
|
|
// If the cached base texture is older that the terrain file or
|
|
|
// it doesn't exist then generate and cache it.
|
|
|
String baseCachePath = _getBaseTexCacheFileName();
|
|
|
- if ( Platform::compareModifiedTimes( baseCachePath, mTerrFileName ) < 0 )
|
|
|
+ if ( Platform::compareModifiedTimes( baseCachePath, mTerrFileName ) < 0 && mUpdateBasetex )
|
|
|
_updateBaseTexture( true );
|
|
|
|
|
|
// The base texture should have been cached by now... so load it.
|
|
@@ -1146,6 +1147,8 @@ void TerrainBlock::initPersistFields()
|
|
|
"Light map dimensions in pixels." );
|
|
|
|
|
|
addField( "screenError", TypeS32, Offset( mScreenError, TerrainBlock ), "Not yet implemented." );
|
|
|
+
|
|
|
+ addField( "updateBasetex", TypeBool, Offset( mUpdateBasetex, TerrainBlock ), "Whether or not to update the Base Texture" );
|
|
|
|
|
|
endGroup( "Misc" );
|
|
|
|
|
@@ -1199,6 +1202,8 @@ U32 TerrainBlock::packUpdate(NetConnection* con, U32 mask, BitStream *stream)
|
|
|
stream->write( mScreenError );
|
|
|
|
|
|
stream->writeInt(mBaseTexFormat, 32);
|
|
|
+
|
|
|
+ stream->writeFlag( mUpdateBasetex );
|
|
|
|
|
|
return retMask;
|
|
|
}
|
|
@@ -1268,6 +1273,8 @@ void TerrainBlock::unpackUpdate(NetConnection* con, BitStream *stream)
|
|
|
stream->read( &mScreenError );
|
|
|
|
|
|
mBaseTexFormat = (BaseTexFormat)stream->readInt(32);
|
|
|
+
|
|
|
+ mUpdateBasetex = stream->readFlag();
|
|
|
}
|
|
|
|
|
|
void TerrainBlock::getMinMaxHeight( F32 *minHeight, F32 *maxHeight ) const
|