|
@@ -58,9 +58,9 @@ public class PlayerController : MonoBehaviour
|
|
|
static bool starting = false; // флаг остановки
|
|
|
public Dictionary<uint, bool> end_send = new Dictionary<uint, bool>(); // флаги завершения загрузки
|
|
|
Dictionary<uint, MarkerMoving> moving = new Dictionary<uint, MarkerMoving>(); // флаги начала движения
|
|
|
-
|
|
|
-
|
|
|
- float interpolationPeriod = 0.1f;
|
|
|
+
|
|
|
+
|
|
|
+ const float INTERPOLATION_PERIOD = 0.1f;
|
|
|
//float time_realtime = 0;
|
|
|
float time_draw = 0;
|
|
|
public List<User> users = new List<User>();
|
|
@@ -115,10 +115,10 @@ public class PlayerController : MonoBehaviour
|
|
|
|
|
|
|
|
|
time_draw += Time.deltaTime;
|
|
|
- if (time_draw >= interpolationPeriod)
|
|
|
+ if (time_draw >= INTERPOLATION_PERIOD)
|
|
|
{
|
|
|
MarkerMove();
|
|
|
- time_draw -= interpolationPeriod;
|
|
|
+ time_draw -= INTERPOLATION_PERIOD;
|
|
|
}
|
|
|
|
|
|
//if (active_mode == Mode.RealTime && !starting)
|
|
@@ -376,17 +376,19 @@ public class PlayerController : MonoBehaviour
|
|
|
|
|
|
}
|
|
|
|
|
|
- step += interpolationPeriod; // 0.1f;
|
|
|
+ step += INTERPOLATION_PERIOD; // 0.1f;
|
|
|
moving[m.acc_id].step = step;
|
|
|
- if (step > 1)
|
|
|
+ if (Math.Round(step, 1) > 1)
|
|
|
{
|
|
|
+ Debug.Log($"step:{step}");
|
|
|
i++;
|
|
|
moving[m.acc_id].index = i;
|
|
|
}
|
|
|
|
|
|
if (active_mode == Mode.RealTime)
|
|
|
- if (step > 1)
|
|
|
+ if (Math.Round(step, 1) > 1)
|
|
|
{
|
|
|
+ Debug.Log($"Mode.RealTime step:{step}");
|
|
|
Workers.Remove(m.acc_id);
|
|
|
Debug.LogWarning($"clear coord user {m.acc_id}");
|
|
|
}
|