diff --git a/main/source/detour/DetourNavMesh.cpp b/main/source/detour/DetourNavMesh.cpp index 4c7cfd3b..6b7447c3 100644 --- a/main/source/detour/DetourNavMesh.cpp +++ b/main/source/detour/DetourNavMesh.cpp @@ -1238,10 +1238,10 @@ dtStatus dtNavMesh::addTile(unsigned char* data, int dataSize, int flags, connectIntLinks(tile); - for (int i = 0; i < tile->header->offMeshConCount; i++) - { - baseOffMeshLinks(tile->offMeshCons[i]); - } + //for (int i = 0; i < tile->header->offMeshConCount; i++) + //{ + // baseOffMeshLinks(tile->offMeshCons[i]); + //} // Create connections with neighbour tiles. static const int MAX_NEIS = 32; diff --git a/main/source/detour/DetourTileCache.cpp b/main/source/detour/DetourTileCache.cpp index 63a8b91b..6f8e99fb 100644 --- a/main/source/detour/DetourTileCache.cpp +++ b/main/source/detour/DetourTileCache.cpp @@ -814,6 +814,7 @@ dtStatus dtTileCache::update(const float /*dt*/, dtNavMesh* navmesh, if (con->state == DT_OFFMESH_DIRTY) { navmesh->unconnectOffMeshLink(con); + navmesh->baseOffMeshLinks(con); navmesh->GlobalOffMeshLinks(con); con->state = DT_OFFMESH_CLEAN; } diff --git a/main/source/mod/AIPlayers/AvHAINavigation.cpp b/main/source/mod/AIPlayers/AvHAINavigation.cpp index 8fc6924c..9089282e 100644 --- a/main/source/mod/AIPlayers/AvHAINavigation.cpp +++ b/main/source/mod/AIPlayers/AvHAINavigation.cpp @@ -3708,9 +3708,11 @@ void PhaseGateMove(AvHAIPlayer* pBot, const Vector StartPoint, const Vector EndP bool IsBotOffPath(const AvHAIPlayer* pBot) { + // Can't be off the path if we don't have one... if (pBot->BotNavInfo.CurrentPath.size() == 0) { return false; } - + + if (pBot->BotNavInfo.CurrentPathPoint->flag == SAMPLE_POLYFLAGS_LIFT) { return false; } // If we're trying to use a phase gate, then we're fine as long as there is a phase gate within reach at the start and end teleport points if (pBot->BotNavInfo.CurrentPathPoint->flag == SAMPLE_POLYFLAGS_TEAM1PHASEGATE || pBot->BotNavInfo.CurrentPathPoint->flag == SAMPLE_POLYFLAGS_TEAM2PHASEGATE) @@ -3981,8 +3983,8 @@ void MoveToWithoutNav(AvHAIPlayer* pBot, const Vector Destination) bool bumpLeft = !UTIL_QuickHullTrace(pBot->Edict, stTrcLft, endTrcLft, head_hull); bool bumpRight = !UTIL_QuickHullTrace(pBot->Edict, stTrcRt, endTrcRt, head_hull); - UTIL_DrawLine(INDEXENT(1), stTrcLft, endTrcLft, 255, 0, 0); - UTIL_DrawLine(INDEXENT(1), stTrcRt, endTrcRt, 0, 0, 255); + //UTIL_DrawLine(INDEXENT(1), stTrcLft, endTrcLft, 255, 0, 0); + //UTIL_DrawLine(INDEXENT(1), stTrcRt, endTrcRt, 0, 0, 255); pBot->desiredMovementDir = vForward; diff --git a/main/source/mod/AIPlayers/AvHAIPlayer.cpp b/main/source/mod/AIPlayers/AvHAIPlayer.cpp index 1f31da82..00a82df8 100644 --- a/main/source/mod/AIPlayers/AvHAIPlayer.cpp +++ b/main/source/mod/AIPlayers/AvHAIPlayer.cpp @@ -1502,7 +1502,7 @@ void DroneThink(AvHAIPlayer* pBot) BotProgressTask(pBot, &pBot->PrimaryBotTask); } - AIDEBUG_DrawBotPath(pBot); + //AIDEBUG_DrawBotPath(pBot); } void TestNavThink(AvHAIPlayer* pBot) diff --git a/main/source/mod/AIPlayers/AvHAITactical.cpp b/main/source/mod/AIPlayers/AvHAITactical.cpp index 48d96d30..111815e9 100644 --- a/main/source/mod/AIPlayers/AvHAITactical.cpp +++ b/main/source/mod/AIPlayers/AvHAITactical.cpp @@ -841,13 +841,6 @@ void AITAC_RefreshReachabilityForResNode(AvHAIResourceNode* ResNode) else { bool bIsReachableSkulk = UTIL_PointIsReachable(GetBaseNavProfile(SKULK_BASE_NAV_PROFILE), TeamBStart, ResNodeLocation, max_player_use_reach); - - if (!bIsReachableSkulk) - { - UTIL_DrawLine(INDEXENT(1), INDEXENT(1)->v.origin, ResNodeLocation, 20.0f); - UTIL_DrawLine(INDEXENT(1), INDEXENT(1)->v.origin, TeamBStart, 20.0f, 255, 255, 0); - } - bool bIsReachableGorge = UTIL_PointIsReachable(GetBaseNavProfile(GORGE_BASE_NAV_PROFILE), TeamBStart, ResNodeLocation, max_player_use_reach); bool bIsReachableOnos = UTIL_PointIsReachable(GetBaseNavProfile(ONOS_BASE_NAV_PROFILE), TeamBStart, ResNodeLocation, max_player_use_reach);