Skip to content

Commit

Permalink
Updated ColliderManager to avoid scoring * players in instance (Check…
Browse files Browse the repository at this point in the history
… only for world master).
  • Loading branch information
tapafon committed Oct 18, 2024
1 parent 301fe2e commit b538756
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/AirHockey/Scripts/ColliderManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void Start()

private void OnCollisionEnter(Collision other)
{
if (other.gameObject.name == puck.name)
if (other.gameObject.name == puck.name && Networking.LocalPlayer.isMaster)
{
_gameManager.OnScored(player);
}
Expand Down

0 comments on commit b538756

Please sign in to comment.