Skip to content

Commit

Permalink
Slightly move unit up when finding a position to get it unstuck, beca…
Browse files Browse the repository at this point in the history
…use nav areas might not be perfect. Also test if position is correct.
  • Loading branch information
Sandern committed Jun 9, 2014
1 parent 4c7b647 commit 49274bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/game/shared/lambdawars/unit_locomotion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1652,11 +1652,13 @@ void UnitBaseLocomotion::DoUnstuck()
CNavArea *pArea = TheNavMesh->GetNearestNavArea( mv->origin, true, 10000.0f, false, false );
if( pArea )
{
positioninfo_t info( pArea->GetCenter(), m_vecMins, m_vecMaxs, 0, 1024.0f );
positioninfo_t info( pArea->GetCenter(), m_vecMins, m_vecMaxs, 0, 1024.0f, 0, 0, NULL,
8.0f, 256.0f, MASK_NPCSOLID, true );
UTIL_FindPosition( info );
if( info.m_bSuccess )
{
mv->origin = info.m_vPosition;
mv->origin.z += 16.0f;
bFoundPosition = true;
}
}
Expand Down

0 comments on commit 49274bb

Please sign in to comment.