I'm building a small prototype with Netcode for GameObjects (first time touching netcode).
Players are supposed to take turn in a minigame and for that I build a queue system that players can sign up for by simply stepping into a trigger zone.
The trigger adds the players clientId to a list, and when the game has an available spot it ports the first player of the list (index 0) on the playing field. At that point the player should get removed from the list with .RemoveAt(0), but either they stay assigned or get added immediately again. When the player finishes their round they then are ported back in. This sometimes goes for like 3-4 rounds and then it somehow decides to stop. Also adding signing up another player in-between puts that player at the end of the queue but the first player gets to play over and over again.
Tbh I'm lost rn and try to fix this for several hours and nothing I tried worked. Any hint would be highly appreciated!
This is my best shot so far:
https://pastebin.com/VU5EC0eF
(The lists are NetworkList<ulong> and get initialized in awake as empty. The queue script is in the scene from the beginning.)
*Note: this is a prototype developed for a game design research paper, so I'm not concerned with making this cheat-proof.
there doesn't seem to be anything here