MegaAntiCheat / client-backend

GNU General Public License v3.0
117 stars 24 forks source link

Persist "Spawning" Flag until player actually spawns. #122

Closed megascatterbomb closed 6 months ago

megascatterbomb commented 6 months ago

The "Spawning" flag as reported by status typically disappears long before a player has loaded into the game.

I thought it would be useful to "sticky" the spawning flag i.e. persist it until the player actually chooses a class and spawns (or joins spectator).

In addition, I added logic to manually set the PlayerState to Spawning if they've been connected for under 30 seconds and are on the unassigned team. Since the "Spawning" flag reported by status disappears so quickly, it makes sense to set it manually.