Browse Source

Fixed wrong animation paths

AlexVinS 8 years ago
parent
commit
2f7968b803
2 changed files with 5 additions and 0 deletions
  1. 3 0
      client/gui/CAnimation.cpp
  2. 2 0
      lib/mapObjects/ObjectTemplate.cpp

+ 3 - 0
client/gui/CAnimation.cpp

@@ -1468,6 +1468,9 @@ CAnimation::CAnimation(std::string Name, bool Compressed):
 	CDefFile * file = getFile();
 	init(file);
 	delete file;
+
+	if(source.empty())
+		logAnim->error("Animation %s failed to load", Name);
 }
 
 CAnimation::CAnimation():

+ 2 - 0
lib/mapObjects/ObjectTemplate.cpp

@@ -101,6 +101,8 @@ void ObjectTemplate::afterLoadFixup()
 		usedTiles[0][0] = VISITABLE;
 		visitDir = 0xFF;
 	}
+	boost::algorithm::replace_all(animationFile, "\\", "/");
+	boost::algorithm::replace_all(editorAnimationFile, "\\", "/");
 }
 
 void ObjectTemplate::readTxt(CLegacyConfigParser & parser)