diff --git a/Netick/Editor/Netick.Unity.Editor.dll b/Netick/Editor/Netick.Unity.Editor.dll index 552e556..ea77b73 100644 Binary files a/Netick/Editor/Netick.Unity.Editor.dll and b/Netick/Editor/Netick.Unity.Editor.dll differ diff --git a/Netick/Editor/Netick.Unity.Pro.Editor.dll b/Netick/Editor/Netick.Unity.Pro.Editor.dll index 143d4c1..3b85db6 100644 Binary files a/Netick/Editor/Netick.Unity.Pro.Editor.dll and b/Netick/Editor/Netick.Unity.Pro.Editor.dll differ diff --git a/Netick/Editor/Unity.Netick.CodeGen.dll b/Netick/Editor/Unity.Netick.CodeGen.dll index a91111d..c592595 100644 Binary files a/Netick/Editor/Unity.Netick.CodeGen.dll and b/Netick/Editor/Unity.Netick.CodeGen.dll differ diff --git a/Netick/Runtime/Netick.Unity.Pro.dll b/Netick/Runtime/Netick.Unity.Pro.dll index 90e3116..fa0bbde 100644 Binary files a/Netick/Runtime/Netick.Unity.Pro.dll and b/Netick/Runtime/Netick.Unity.Pro.dll differ diff --git a/Netick/Runtime/Netick.Unity.dll b/Netick/Runtime/Netick.Unity.dll index af69594..4b87d26 100644 Binary files a/Netick/Runtime/Netick.Unity.dll and b/Netick/Runtime/Netick.Unity.dll differ diff --git a/Samples~/First Person Shooter/Scripts/FPSEventsHandler.cs b/Samples~/First Person Shooter/Scripts/FPSEventsHandler.cs index 9de95e3..6f1fc4c 100644 --- a/Samples~/First Person Shooter/Scripts/FPSEventsHandler.cs +++ b/Samples~/First Person Shooter/Scripts/FPSEventsHandler.cs @@ -12,7 +12,7 @@ namespace Netick.Samples.FPS // This is called on the server when a player has connected. public override void OnPlayerConnected(NetworkSandbox sandbox, NetworkPlayer networkPlayer) { - var spawnPos = SpawnPos.position + Vector3.left * (1 + sandbox.ConnectedPlayers.Count); + var spawnPos = SpawnPos.position + (Vector3.left * sandbox.ConnectedPlayers.Count); var player = sandbox.NetworkInstantiate(PlayerPrefab, spawnPos, Quaternion.identity, networkPlayer).GetComponent(); networkPlayer.PlayerObject = player.gameObject; } diff --git a/Scripts/PlayerSpawner.cs b/Scripts/PlayerSpawner.cs index 4e1430b..d868f6d 100644 --- a/Scripts/PlayerSpawner.cs +++ b/Scripts/PlayerSpawner.cs @@ -22,7 +22,7 @@ namespace Netick.Samples { var spawnPos = SpawnPosition.position; if (StaggerSpawns) - spawnPos += (HorizontalOffset * Vector3.left) * (1 + sandbox.ConnectedPlayers.Count); + spawnPos += (HorizontalOffset * Vector3.left) * (sandbox.ConnectedPlayers.Count - 1); var player = sandbox.NetworkInstantiate(PlayerPrefab, spawnPos, SpawnPosition.rotation, client); client.PlayerObject = player; } diff --git a/package.json b/package.json index 54f2825..03eb23b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.karrar.netick", - "version": "0.13.20", + "version": "0.13.21", "displayName": "Netick", "description": "A networking solution for Unity", "unity": "2021.3",