From 52d5c8fc47438baddec497e7f43864a06f92e921 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Sun, 27 Jul 2025 20:34:27 +0300 Subject: [PATCH] fix: score sounds appearing earlier fixed --- Shared/Behaviours/Ball.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Shared/Behaviours/Ball.cs b/Shared/Behaviours/Ball.cs index a329ae3..613a0b0 100644 --- a/Shared/Behaviours/Ball.cs +++ b/Shared/Behaviours/Ball.cs @@ -70,7 +70,9 @@ public class Ball : Behaviour2D, IFirstFrameUpdate, ILoadContent, IPhysicsUpdate RigidBody.Velocity = information.Detected.Transform.Position.FromTo(information.Detector.Transform.Position).Normalized * RigidBody.Velocity.Magnitude; else RigidBody.Velocity = RigidBody.Velocity.Reflect(information.Normal); - networkServer?.SendToAll(new BallUpdatePacket(this)); + + if (information.Detected.Transform.BehaviourController.GetBehaviour() is null) + networkServer?.SendToAll(new BallUpdatePacket(this)); } public Ball() { }