Permalink
Browse files

scan sub_models when producing model cache checksum. fixes #1181

  • Loading branch information...
1 parent 6a57b43 commit 5f8b74d158f86e934f0bcf3b308b04b1a9ad7dbb @johnbartholomew committed Apr 15, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/LmrModel.cpp
View
@@ -4405,14 +4405,18 @@ static Uint32 _calculate_all_models_checksum()
{
// do we need to rebuild the model cache?
CRC32 crc;
- for (FileSystem::FileEnumerator files(FileSystem::gameDataFiles, "models", FileSystem::FileEnumerator::Recurse); !files.Finished(); files.Next())
- {
+ FileSystem::FileEnumerator files(FileSystem::gameDataFiles, FileSystem::FileEnumerator::Recurse);
+ files.AddSearchRoot("models");
+ files.AddSearchRoot("sub_models");
+ while (!files.Finished()) {
const FileSystem::FileInfo &info = files.Current();
assert(info.IsFile());
if (info.GetPath().substr(info.GetPath().size() - 4) != ".png") {
RefCountedPtr<FileSystem::FileData> data = files.Current().Read();
crc.AddData(data->GetData(), data->GetSize());
}
+
+ files.Next();
}
return crc.GetChecksum();
}

0 comments on commit 5f8b74d

Please sign in to comment.