Fixed a bug were cache was generating bad file names(increased to v4), some building animations now work.

This commit is contained in:
Justin Marshall
2020-06-21 11:37:05 -07:00
parent b19e278529
commit 378a615ffd
3 changed files with 35 additions and 7 deletions
+4 -1
View File
@@ -38,7 +38,10 @@ const char* Buildings_FindHDTexture(const char* shapeFileName, int shapeNum, int
}
int Buildings_GetNumFramesForTile(const char* shapeFileName, int shapeNum) {
int64_t hash = generateHashValue(shapeFileName, strlen(shapeFileName));
char tmpFileName[2048];
strcpy(tmpFileName, shapeFileName);
COM_SetExtension(tmpFileName, strlen(tmpFileName), "");
int64_t hash = generateHashValue(tmpFileName, strlen(tmpFileName));
for (int i = 0; i < buildingsXmlRules.tiles.size(); i++) {
if (buildingsXmlRules.tiles[i].hash == hash && buildingsXmlRules.tiles[i].shape == shapeNum) {
return buildingsXmlRules.tiles[i].frames.size();