mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 06:34:16 +00:00
use double for time measuring
This commit is contained in:
parent
c0ee1612a7
commit
3da0a75562
1 changed files with 5 additions and 5 deletions
|
@ -8,14 +8,14 @@ namespace SanAndreasUnity.Utilities
|
|||
{
|
||||
public NavMeshAgent NavMeshAgent { get; private set; }
|
||||
|
||||
private float m_lastTimeWhenSearchedForPath = 0f;
|
||||
private double m_lastTimeWhenSearchedForPath = 0f;
|
||||
|
||||
public Vector3? Destination { get; set; } = null;
|
||||
private Vector3? m_lastAssignedDestination = null;
|
||||
private Vector3? m_lastPositionWhenAssignedDestination = null;
|
||||
|
||||
private float m_lastTimeWhenWarped = 0f;
|
||||
private float m_timeWhenSampledOffNavMesh = 0f;
|
||||
private double m_lastTimeWhenWarped = 0f;
|
||||
private double m_timeWhenSampledOffNavMesh = 0f;
|
||||
|
||||
public float warpSampleDistance = 4.5f;
|
||||
|
||||
|
@ -94,7 +94,7 @@ namespace SanAndreasUnity.Utilities
|
|||
return;
|
||||
}
|
||||
|
||||
float currentTime = Time.time;
|
||||
double currentTime = Time.timeAsDouble;
|
||||
Vector3 myPosition = agent.transform.position;
|
||||
|
||||
agent.nextPosition = myPosition;
|
||||
|
@ -275,7 +275,7 @@ namespace SanAndreasUnity.Utilities
|
|||
{
|
||||
NavMeshAgent navMeshAgent = this.NavMeshAgent;
|
||||
|
||||
m_lastTimeWhenSearchedForPath = Time.time;
|
||||
m_lastTimeWhenSearchedForPath = Time.timeAsDouble;
|
||||
m_lastAssignedDestination = this.Destination.Value;
|
||||
m_lastPositionWhenAssignedDestination = navMeshAgent.transform.position;
|
||||
|
||||
|
|
Loading…
Reference in a new issue