diff options
Diffstat (limited to 'src/common/Collision/Models/ModelInstance.cpp')
-rw-r--r-- | src/common/Collision/Models/ModelInstance.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/common/Collision/Models/ModelInstance.cpp b/src/common/Collision/Models/ModelInstance.cpp index 7341640535..01e2219cd6 100644 --- a/src/common/Collision/Models/ModelInstance.cpp +++ b/src/common/Collision/Models/ModelInstance.cpp @@ -65,9 +65,13 @@ namespace VMAP // M2 files don't contain area info, only WMO files if (flags & MOD_M2) + { return; + } if (!iBound.contains(p)) + { return; + } // child bounds are defined in object space: Vector3 pModel = iInvRot * (p - iPos) * iInvScale; Vector3 zDirModel = iInvRot * Vector3(0.f, 0.f, -1.f); @@ -99,9 +103,13 @@ namespace VMAP // M2 files don't contain area info, only WMO files if (flags & MOD_M2) + { return false; + } if (!iBound.contains(p)) + { return false; + } // child bounds are defined in object space: Vector3 pModel = iInvRot * (p - iPos) * iInvScale; Vector3 zDirModel = iInvRot * Vector3(0.f, 0.f, -1.f); @@ -147,7 +155,9 @@ namespace VMAP if (!check) { if (ferror(rf)) + { std::cout << "Error reading ModelSpawn!\n"; + } return false; } check += fread(&spawn.adtId, sizeof(uint16), 1, rf); @@ -202,9 +212,9 @@ namespace VMAP } uint32 nameLen = spawn.name.length(); check += fwrite(&nameLen, sizeof(uint32), 1, wf); - if (check != uint32(has_bound ? 17 : 11)) return false; + if (check != uint32(has_bound ? 17 : 11)) { return false; } check = fwrite(spawn.name.c_str(), sizeof(char), nameLen, wf); - if (check != nameLen) return false; + if (check != nameLen) { return false; } return true; } |