summaryrefslogtreecommitdiff
path: root/GroundMaterialConfiguration.cpp
diff options
context:
space:
mode:
authorJapa2010-08-28 12:51:59 +0000
committerJapa2010-08-28 12:51:59 +0000
commit820eca018cba6ead34e13f535e652f59de57fcd3 (patch)
tree1c50a5d7658ae8b703c885e17cc67370bad0a743 /GroundMaterialConfiguration.cpp
parent1dae8d2941a8b8c4ae3227344b3cc5c02ee7d355 (diff)
downloadstonesense-820eca018cba6ead34e13f535e652f59de57fcd3.tar.gz
stonesense-820eca018cba6ead34e13f535e652f59de57fcd3.tar.bz2
stonesense-820eca018cba6ead34e13f535e652f59de57fcd3.tar.xz
Fixed an issue where old terrain xml files wouldn't get loaded.
Diffstat (limited to 'GroundMaterialConfiguration.cpp')
-rw-r--r--GroundMaterialConfiguration.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/GroundMaterialConfiguration.cpp b/GroundMaterialConfiguration.cpp
index 97ccc0b..e5ceb16 100644
--- a/GroundMaterialConfiguration.cpp
+++ b/GroundMaterialConfiguration.cpp
@@ -53,8 +53,10 @@ void DumpInorganicMaterialNamesToDisk(){
void parseWallFloorSpriteElement( TiXmlElement* elemWallFloorSprite, vector<TerrainConfiguration*>& configTable ,int basefile, bool floor)
{
- const char* spriteIndexStr = elemWallFloorSprite->Attribute("sheetIndex");
- if (spriteIndexStr == NULL || spriteIndexStr[0] == 0)
+ const char* spriteSheetIndexStr = elemWallFloorSprite->Attribute("sheetIndex");
+ const char* spriteSpriteStr = elemWallFloorSprite->Attribute("sprite");
+ const char* spriteIndexStr = elemWallFloorSprite->Attribute("index");
+ if ((spriteSheetIndexStr == NULL || spriteSheetIndexStr[0] == 0) && (spriteSpriteStr == NULL || spriteSpriteStr[0] == 0) && (spriteIndexStr == NULL || spriteIndexStr[0] == 0))
{
contentError("Invalid or missing sprite attribute",elemWallFloorSprite);
return; //nothing to work with