1
This commit is contained in:
parent
72dd76ffee
commit
bbbc3d6401
@ -210,7 +210,6 @@ func (this *room) join(hum common.Player, msg *cs.CMJoinRoom) bool {
|
||||
m := newMember(this, hum)
|
||||
this.addMember(m)
|
||||
t = newTeam(this, this.genTeamId(), msg.GetTeamUuid(), m)
|
||||
t.addMember(m)
|
||||
if msg.GetIsObserver() != 0 {
|
||||
this.addObTeam(t)
|
||||
} else {
|
||||
@ -295,11 +294,12 @@ func (this *room) fillMFCurrentRoom(hum common.Player, pb *cs.MFCurrentRoom) {
|
||||
sort.Slice(pb.TeamList, func(i, j int) bool {
|
||||
return pb.TeamList[i].GetSortIdx() < pb.TeamList[j].GetSortIdx()
|
||||
})
|
||||
q5.NewSlice(&pb.ObserverTeamList, 0, 10)
|
||||
for _, t := range this.obTeamUuidHash {
|
||||
pbT := &cs.MFTeam{}
|
||||
t.fillMFTeam(pbT)
|
||||
pbT.SortIdx = proto.Int32(t.obSortIdx)
|
||||
q5.AppendSlice(&pb.TeamList, pbT)
|
||||
q5.AppendSlice(&pb.ObserverTeamList, pbT)
|
||||
}
|
||||
sort.Slice(pb.ObserverTeamList, func(i, j int) bool {
|
||||
return pb.ObserverTeamList[i].GetSortIdx() < pb.ObserverTeamList[j].GetSortIdx()
|
||||
|
Loading…
x
Reference in New Issue
Block a user