mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Tools/Vmaps: Fix models bounds (#26864)
This commit is contained in:
@@ -247,12 +247,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user