Recast: always show the actual mesh bounds

When loading from .gset, the editor would clip anything outside the stored bounds, but we still need the outer bounds as otherwise editing the existing bounds would be a lot harder.
This commit is contained in:
Kawe Mazidjatari 2024-07-16 12:39:36 +02:00
parent 2ad55ede56
commit 62a65df532
2 changed files with 8 additions and 8 deletions

View File

@ -35,8 +35,8 @@ static void EditorCommon_DrawInputGeometry(duDebugDraw* const dd, const InputGeo
static void EditorCommon_DrawBoundingBox(duDebugDraw* const dd, const InputGeom* const geom)
{
// Draw bounds
const float* const origBmin = geom->getOriginalNavMeshBoundsMin();
const float* const origBmax = geom->getOriginalNavMeshBoundsMax();
const float* const origBmin = geom->getMeshBoundsMin();
const float* const origBmax = geom->getMeshBoundsMax();
duDebugDrawBoxWire(dd, origBmin[0], origBmin[1], origBmin[2], origBmax[0], origBmax[1], origBmax[2], duRGBA(255, 255, 255, 170), 1.0f, nullptr);
const float* const navBmin = geom->getNavMeshBoundsMin();

View File

@ -530,8 +530,8 @@ int not_main(int argc, char** argv)
const float* bmax = 0;
if (geom)
{
bmin = geom->getNavMeshBoundsMin();
bmax = geom->getNavMeshBoundsMax();
bmin = geom->getOriginalNavMeshBoundsMin();
bmax = geom->getOriginalNavMeshBoundsMax();
}
if (!commandLine)
{
@ -1068,8 +1068,8 @@ int not_main(int argc, char** argv)
const float* bmax = 0;
if (geom)
{
bmin = geom->getNavMeshBoundsMin();
bmax = geom->getNavMeshBoundsMax();
bmin = geom->getMeshBoundsMin();
bmax = geom->getMeshBoundsMax();
}
// Reset camera and fog to match the mesh bounds.
update_camera(bmin, bmax, cameraPos, cameraEulers, camr);
@ -1141,8 +1141,8 @@ int not_main(int argc, char** argv)
const float* bmax = 0;
if (geom)
{
bmin = geom->getNavMeshBoundsMin();
bmax = geom->getNavMeshBoundsMax();
bmin = geom->getMeshBoundsMin();
bmax = geom->getMeshBoundsMax();
}
// Reset camera and fog to match the mesh bounds.
update_camera(bmin, bmax, cameraPos, cameraEulers, camr);