Add a quick fix to allow partying with 4 players

This commit is contained in:
Sophie
2020-03-11 07:43:19 +00:00
parent 985efa797c
commit c22793e102

View File

@@ -646,7 +646,12 @@ func handleMsgSysReserveStage(s *Session, p mhfpacket.MHFPacket) {
stage.Lock()
defer stage.Unlock()
if uint16(len(stage.reservedClientSlots)) < stage.maxPlayers {
// Quick fix to allow readying up while party is full, more investigation needed
// Reserve stage is also sent when a player is ready, probably need to parse the
// request a little more thoroughly.
if _, exists := stage.reservedClientSlots[s.charID]; exists {
s.QueueAck(pkt.AckHandle, []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})
} else if uint16(len(stage.reservedClientSlots)) < stage.maxPlayers {
// Add the charID to the stage's reservation map
stage.reservedClientSlots[s.charID] = nil