Tools/VMapExtrator: ported m2 model bounds issue fix from master branch

This commit is contained in:
Ovahlord committed 2021-08-28 14:39:19 +02:00
1 parent 5ed7516280
commit ce1901524f
1 file changed
+4 -5
+4 -5
View File
@@ -252,12 +252,11 @@ namespace VMAP
if (groups != 1)
printf("Warning: '%s' does not seem to be a M2 model!\n", modelFilename.c_str());
AABox modelBound;
AABox rotated_bounds;
for (int i = 0; i < 8; ++i)
rotated_bounds.merge(modelPosition.transform(raw_model.groupsArray[0].bounds.corner(i)));
modelBound.merge(modelPosition.transform(raw_model.groupsArray[0].bounds.low()));
modelBound.merge(modelPosition.transform(raw_model.groupsArray[0].bounds.high()));
spawn.iBound = modelBound + spawn.iPos;
spawn.iBound = rotated_bounds + spawn.iPos;
spawn.flags |= MOD_HAS_BOUND;
return true;
}