-
Notifications
You must be signed in to change notification settings - Fork 21
Player spawn points should be uniformly distributed #1891
Copy link
Copy link
Labels
Bug ReportBug Reports made through the "Report Issue" interface in GitHub.Bug Reports made through the "Report Issue" interface in GitHub.GameplayStuff that isn't gamemode or weapon specific, such as spectating, audio, configs.Stuff that isn't gamemode or weapon specific, such as spectating, audio, configs.
Description
Build Info
v28.4-alpha
Description
Currently, the spawn point choosing logic is using a random stride of 1-5:
neo/src/game/server/neo/neo_player.cpp
Lines 2920 to 2923 in 1a41012
| pSpot = pLastSpawnPoint; | |
| // Randomize the start spot | |
| for (int i = random->RandomInt(1, 5); i > 0; i--) | |
| pSpot = gEntList.FindEntityByClassname(pSpot, pSpawnpointName); |
This can lead to strange patterns of repeat spawns which are not uniformly distributed, as reported in: https://discord.com/channels/1235346473827434517/1235349179296120946/1486408778357145710
To Reproduce
Observe the spawn points logic.
Expected behavior
Uniform distribution.
Actual behavior
Deterministic random stride of 1-5 + mod cycle.
Operating System
- Windows
- Linux
Version/Distro
11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bug ReportBug Reports made through the "Report Issue" interface in GitHub.Bug Reports made through the "Report Issue" interface in GitHub.GameplayStuff that isn't gamemode or weapon specific, such as spectating, audio, configs.Stuff that isn't gamemode or weapon specific, such as spectating, audio, configs.
Type
Projects
Status
No status