Update Drone.cs

This commit is contained in:
2025-07-03 23:44:35 +03:00
parent 35ab5b2f4e
commit 28965a3609

View File

@ -516,9 +516,18 @@ namespace DroneSimulator
of.Head.Time = (uint)(DateTime.Now.Ticks / Stopwatch.Frequency / 1000); of.Head.Time = (uint)(DateTime.Now.Ticks / Stopwatch.Frequency / 1000);
lock (this) lock (this)
{
if (CountOF != 0)
{ {
of.X = MoveOF.X / CountOF; of.X = MoveOF.X / CountOF;
of.Y = MoveOF.Y / CountOF; of.Y = MoveOF.Y / CountOF;
}
else
{
of.X = 0;
of.Y = 0;
}
of.Time = RealOF.timer; of.Time = RealOF.timer;
MoveOF = Vector2.Zero; MoveOF = Vector2.Zero;