2
0
Эх сурвалжийг харах

Fixed wrong animation paths

AlexVinS 8 жил өмнө
parent
commit
2f7968b803

+ 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)