mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-26 17:43:21 +01:00
bypass full Stage check if reserve slot exists
This commit is contained in:
@@ -150,6 +150,9 @@ func removeSessionFromStage(s *Session) {
|
|||||||
|
|
||||||
func isStageFull(s *Session, StageID string) bool {
|
func isStageFull(s *Session, StageID string) bool {
|
||||||
if stage, exists := s.server.stages[StageID]; exists {
|
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 len(stage.reservedClientSlots)+len(stage.clients) >= int(stage.maxPlayers)
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user