bypass full Stage check if reserve slot exists

This commit is contained in:
wish
2024-03-16 21:02:49 +11:00
parent 19aadc6e10
commit 76858bb111

View File

@@ -150,6 +150,9 @@ func removeSessionFromStage(s *Session) {
func isStageFull(s *Session, StageID string) bool {
if stage, exists := s.server.stages[StageID]; exists {
if _, exists := stage.reservedClientSlots[s.charID]; exists {
return false
}
return len(stage.reservedClientSlots)+len(stage.clients) >= int(stage.maxPlayers)
}
return false