CAI_Utility::DrawAIScriptNetwork: light cleanup

This commit is contained in:
Kawe Mazidjatari 2022-10-24 00:52:32 +02:00
parent 62f0e2aaf0
commit b5b56c83ea

View File

@ -88,11 +88,11 @@ void CAI_Utility::DrawAIScriptNetwork(const CAI_Network* pNetwork) const
// Purpose: draw NavMesh BVTree // Purpose: draw NavMesh BVTree
// Input : *pMesh - // Input : *pMesh -
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void CAI_Utility::DrawNavMeshBVTree(dtNavMesh* pNavMesh) const void CAI_Utility::DrawNavMeshBVTree(dtNavMesh* pMesh) const
{ {
if (!pNavMesh) if (!pMesh)
pNavMesh = GetNavMeshForHull(navmesh_debug_type->GetInt()); pMesh = GetNavMeshForHull(navmesh_debug_type->GetInt());
if (!pNavMesh) if (!pMesh)
return; // NavMesh for hull not loaded. return; // NavMesh for hull not loaded.
const Vector3D vCamera = MainViewOrigin(); const Vector3D vCamera = MainViewOrigin();
@ -101,12 +101,12 @@ void CAI_Utility::DrawNavMeshBVTree(dtNavMesh* pNavMesh) const
const float flCameraRange = navmesh_debug_camera_range->GetFloat(); const float flCameraRange = navmesh_debug_camera_range->GetFloat();
OverlayBox_t::Transforms vTransforms; OverlayBox_t::Transforms vTransforms;
for (int i = navmesh_draw_bvtree->GetInt(), nt = pNavMesh->getTileCount(); i < nt; ++i) for (int i = navmesh_draw_bvtree->GetInt(), nt = pMesh->getTileCount(); i < nt; ++i)
{ {
if (nTileRange > 0 && i > nTileRange) if (nTileRange > 0 && i > nTileRange)
break; break;
const dtMeshTile* pTile = &pNavMesh->m_tiles[i]; const dtMeshTile* pTile = &pMesh->m_tiles[i];
if (!pTile->header) if (!pTile->header)
continue; continue;