mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 16:34:51 +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)
|
pkt := p.(*mhfpacket.MsgSysEnterStage)
|
||||||
|
|
||||||
if stage, exists := s.server.stages[pkt.StageID]; exists {
|
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})
|
doAckSimpleFail(s, pkt.AckHandle, []byte{0x00, 0x00, 0x00, 0x01})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user