Made a small change to PlayerSpawner in how the spawn position is calculated.

This commit is contained in:
Karrar
2025-03-01 01:44:32 +03:00
parent 79fcfc17ff
commit c5ebb22afd
8 changed files with 3 additions and 3 deletions

View File

@@ -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;
}