Auto calculate ymap flags and extents options in project window

This commit is contained in:
dexy
2021-04-21 19:07:32 +10:00
Unverified
parent 0f6474242d
commit b3f9312790
3 changed files with 375 additions and 300 deletions
@@ -1191,6 +1191,18 @@ namespace CodeWalker.GameFiles
}
}
if (CarGenerators != null)
{
foreach (var cargen in CarGenerators)
{
emin = Vector3.Min(emin, cargen.BBMin);
emax = Vector3.Max(emax, cargen.BBMax);
smin = Vector3.Min(smin, cargen.BBMin - cargen._CCarGen.perpendicularLength); //just a random guess, maybe should be more?
smax = Vector3.Max(smax, cargen.BBMax + cargen._CCarGen.perpendicularLength);
}
}
bool change = false;
if (_CMapData.entitiesExtentsMin != emin)