Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/Assets/AstarPathfindingProject/Core/RVO/RVOCoreSimulator.cs b/Assets/AstarPathfindingProject/Core/RVO/RVOCoreSimulator.cs
- index 930efd1c..49e07b52 100644
- --- a/Assets/AstarPathfindingProject/Core/RVO/RVOCoreSimulator.cs
- +++ b/Assets/AstarPathfindingProject/Core/RVO/RVOCoreSimulator.cs
- @@ -782,13 +782,13 @@ namespace Pathfinding.RVO {
- deltaTime = DesiredDeltaTime;
- }
- - if (Time.time - lastStep >= DesiredDeltaTime) {
- - deltaTime = Time.time - lastStep;
- - lastStep = Time.time;
- -
- - // Prevent a zero delta time
- - deltaTime = System.Math.Max(deltaTime, 1.0f/2000f);
- + while(lastStep < Time.time) {
- + Update(DesiredDeltaTime);
- + lastStep += DesiredDeltaTime;
- + }
- + }
- + void Update(float deltaTime) {
- if (Multithreading) {
- // Make sure the threads have completed their tasks
- // Otherwise block until they have
- @@ -864,7 +864,6 @@ namespace Pathfinding.RVO {
- for (int i = 0; i < agents.Count; i++) agents[i].PostCalculation();
- }
- }
- - }
- internal class WorkerContext {
- public Agent.VOBuffer vos = new Agent.VOBuffer(16);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement