mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 15:04:38 +01:00
enforce Stage.maxPlayers on EnterStage
This commit is contained in:
@@ -152,7 +152,7 @@ func handleMsgSysEnterStage(s *Session, p mhfpacket.MHFPacket) {
|
||||
pkt := p.(*mhfpacket.MsgSysEnterStage)
|
||||
|
||||
if stage, exists := s.server.stages[pkt.StageID]; exists {
|
||||
if len(stage.reservedClientSlots) == int(stage.maxPlayers) {
|
||||
if len(stage.reservedClientSlots)+len(stage.clients) == int(stage.maxPlayers) {
|
||||
doAckSimpleFail(s, pkt.AckHandle, []byte{0x00, 0x00, 0x00, 0x01})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user