mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 23:44:52 +01:00
enumerate missing clients
This commit is contained in:
@@ -29,6 +29,9 @@ func handleMsgSysEnumerateClient(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
for _, cid := range stage.clients {
|
for _, cid := range stage.clients {
|
||||||
clients = append(clients, cid)
|
clients = append(clients, cid)
|
||||||
}
|
}
|
||||||
|
for cid := range stage.reservedClientSlots {
|
||||||
|
clients = append(clients, cid)
|
||||||
|
}
|
||||||
case 1: // Not ready
|
case 1: // Not ready
|
||||||
for cid, ready := range stage.reservedClientSlots {
|
for cid, ready := range stage.reservedClientSlots {
|
||||||
if !ready {
|
if !ready {
|
||||||
|
|||||||
@@ -386,7 +386,11 @@ func handleMsgSysEnumerateStage(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
|
|
||||||
bf.WriteUint16(uint16(len(stage.reservedClientSlots)))
|
bf.WriteUint16(uint16(len(stage.reservedClientSlots)))
|
||||||
bf.WriteUint16(uint16(len(stage.clients)))
|
bf.WriteUint16(uint16(len(stage.clients)))
|
||||||
|
if strings.HasPrefix(stage.id, "sl2Ls") {
|
||||||
|
bf.WriteUint16(uint16(len(stage.clients) + len(stage.reservedClientSlots)))
|
||||||
|
} else {
|
||||||
bf.WriteUint16(uint16(len(stage.clients)))
|
bf.WriteUint16(uint16(len(stage.clients)))
|
||||||
|
}
|
||||||
bf.WriteUint16(stage.maxPlayers)
|
bf.WriteUint16(stage.maxPlayers)
|
||||||
var flags uint8
|
var flags uint8
|
||||||
if stage.locked {
|
if stage.locked {
|
||||||
|
|||||||
Reference in New Issue
Block a user