chore: removed timestamp on paddle packet
This commit is contained in:
		@@ -84,7 +84,7 @@ public class PaddleBehaviour(Keys Up, Keys Down, float High, float Low, float Sp
 | 
			
		||||
        isDownPressed = packet.IsDownPressed;
 | 
			
		||||
        Transform.Position = packet.Position;
 | 
			
		||||
 | 
			
		||||
        physicsEngine2D.StepIndividual(rigidBody, new DateTime(DateTime.UtcNow.Ticks - packet.Timestamp).Second);
 | 
			
		||||
        physicsEngine2D.StepIndividual(rigidBody, sender.Ping);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class PaddleKeyStatePacket : IEntityNetworkPacket
 | 
			
		||||
@@ -93,7 +93,6 @@ public class PaddleBehaviour(Keys Up, Keys Down, float High, float Low, float Sp
 | 
			
		||||
        public Vector2D Position { get; set; } = default!;
 | 
			
		||||
        public bool IsUpPressed { get; set; } = default!;
 | 
			
		||||
        public bool IsDownPressed { get; set; } = default!;
 | 
			
		||||
        public long Timestamp { get; set; } = 0;
 | 
			
		||||
 | 
			
		||||
        public PaddleKeyStatePacket Set(PaddleBehaviour paddleBehaviour)
 | 
			
		||||
        {
 | 
			
		||||
@@ -101,7 +100,6 @@ public class PaddleBehaviour(Keys Up, Keys Down, float High, float Low, float Sp
 | 
			
		||||
            Position = paddleBehaviour.Transform.Position;
 | 
			
		||||
            IsUpPressed = paddleBehaviour.isUpPressed;
 | 
			
		||||
            IsDownPressed = paddleBehaviour.isDownPressed;
 | 
			
		||||
            Timestamp = DateTime.UtcNow.Ticks;
 | 
			
		||||
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user