This commit is contained in:
aozhiwei 2024-02-08 17:14:17 +08:00
parent 5dbdc24de5
commit 0051c43d9e
2 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,7 @@ const (
ROOM_DISBAND_DEFAULT_REASON = iota
ROOM_DISBAND_1_REASON
ROOM_DISBAND_NO_NEXT_OWNER_REASON
ROOM_DISBAND_OWNER_OFFLINE_REASON
)
const ROOM_MIN_START_TEAM_NUM = 1

View File

@ -318,6 +318,11 @@ func (this *room) fillMFCurrentRoom(hum common.Player, pb *cs.MFCurrentRoom) {
}
func (this *room) OnPlayerOffline(hum common.Player) {
if this.isOwner(hum) {
if this.roomState == ROOM_INIT_STATE {
this.doDisband(ROOM_DISBAND_OWNER_OFFLINE_REASON)
}
}
}
func (this *room) OnPlayerOnline(hum common.Player) {