further mutex/stage rework

This commit is contained in:
wish
2023-11-13 23:12:25 +11:00
parent e24c432d69
commit 85eb9fe99c
11 changed files with 102 additions and 143 deletions

View File

@@ -29,15 +29,15 @@ func handleMsgSysEnumerateClient(s *Session, p mhfpacket.MHFPacket) {
clients = append(clients, cid)
}
case 1: // Not ready
for cid, ready := range stage.reservedClientSlots {
if !ready {
clients = append(clients, cid)
for _, session := range stage.ReservedSessions(s) {
if !session.reservationReady {
clients = append(clients, session.charID)
}
}
case 2: // Ready
for cid, ready := range stage.reservedClientSlots {
if ready {
clients = append(clients, cid)
for _, session := range stage.ReservedSessions(s) {
if session.reservationReady {
clients = append(clients, session.charID)
}
}
}