mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 06:34:16 +00:00
fix warnings
This commit is contained in:
parent
c570c4c0e7
commit
3ce6c2ab82
1 changed files with 0 additions and 5 deletions
|
@ -108,19 +108,14 @@ namespace SanAndreasUnity.Utilities
|
|||
{
|
||||
m_lastTimeWhenWarped = currentTime;
|
||||
|
||||
bool bWarp = false;
|
||||
bool bSetDestination = false;
|
||||
|
||||
// here we sample position to prevent Unity to spam with warning messages saying that agent is
|
||||
// not close to nav mesh
|
||||
if (NavMesh.SamplePosition(myPosition, out var hit, this.warpSampleDistance, agent.areaMask)
|
||||
&& agent.Warp(myPosition))
|
||||
{
|
||||
bWarp = true;
|
||||
if (this.Destination.HasValue && agent.isOnNavMesh)
|
||||
{
|
||||
this.SetDestination();
|
||||
bSetDestination = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue