|
@@ -350,7 +350,7 @@ public class PlayerController : MonoBehaviour
|
|
|
int i = 0;
|
|
|
float step = 0.1f;
|
|
|
if (moving.ContainsKey(m.acc_id))
|
|
|
- {
|
|
|
+ {
|
|
|
if (moving[m.acc_id].index < Workers[m.acc_id].Count) i = moving[m.acc_id].index;
|
|
|
if (moving[m.acc_id].step < 1.1f) step = moving[m.acc_id].step;
|
|
|
}
|
|
@@ -371,27 +371,27 @@ public class PlayerController : MonoBehaviour
|
|
|
var progress = "";
|
|
|
if (active_mode == Mode.History) progress = $"\n{i + 1} из {Workers[m.acc_id].Count}";
|
|
|
|
|
|
- Position(step, start_pos, end_pos, m, w, progress);
|
|
|
+ Position(step, start_pos, end_pos, m, w, progress);
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
- if (step >= 1)
|
|
|
+ step += interpolationPeriod;
|
|
|
+ moving[m.acc_id].step = step;
|
|
|
+ if (step > 1)
|
|
|
{
|
|
|
i++;
|
|
|
+ moving[m.acc_id].index = i;
|
|
|
}
|
|
|
- step += interpolationPeriod;
|
|
|
- moving[m.acc_id].index = i;
|
|
|
- moving[m.acc_id].step = step;
|
|
|
|
|
|
if (active_mode == Mode.RealTime)
|
|
|
- if (moving[m.acc_id].step >= 1)
|
|
|
+ if (step > 1)
|
|
|
{
|
|
|
Workers.Remove(m.acc_id);
|
|
|
Debug.LogWarning($"clear coord user {m.acc_id}");
|
|
|
}
|
|
|
if (active_mode == Mode.History)
|
|
|
- if (moving[m.acc_id].index == Workers[m.acc_id].Count)
|
|
|
+ if (i == Workers[m.acc_id].Count)
|
|
|
{
|
|
|
|
|
|
Workers.Remove(m.acc_id);
|