MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / DoesHullFileExist

Function DoesHullFileExist

Source/Objects/envobject.cpp:1207–1217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1205static HullExistsCache hull_exists_cache;
1206
1207bool DoesHullFileExist(const std::string& hull_path) {
1208 HullExistsCache::const_iterator iter = hull_exists_cache.find(hull_path);
1209 bool hull_file_exists = false;
1210 if (iter != hull_exists_cache.end()) {
1211 hull_file_exists = iter->second;
1212 } else {
1213 hull_file_exists = FileExists(hull_path.c_str(), kDataPaths | kModPaths);
1214 hull_exists_cache[hull_path] = hull_file_exists;
1215 }
1216 return hull_file_exists;
1217}
1218
1219int EnvObject::GetCollisionModelID() {
1220 if (ofr->bush_collision) {

Callers 1

GetCollisionModelIDMethod · 0.85

Calls 4

FileExistsFunction · 0.85
findMethod · 0.45
endMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected