diff --git a/rpc/user_center_func.go b/rpc/user_center_func.go index c42e08406009d2c05e392df55152c90641b7a3bb..f82275a28c86fbb397b4b0599305a218c5568851 100644 --- a/rpc/user_center_func.go +++ b/rpc/user_center_func.go @@ -262,6 +262,12 @@ func SendSheepGameResult(matchId, winId, userId1, userId2 uint64, nick1, nick2, players = append(players, &userProxy.SheepGamePlayer{IsWin: winId == userId2, User: &userProxy.User{ Id: userId2, Nick: nick2, Avatar: avatar2, }}) + if !players[0].IsWin { + players[0], players[1] = players[1], players[0] + } + for i := range players { + players[i].Rank = int32(i) + 1 + } msg := &userProxy.SheepGameResult{ MatchId: matchId, Players: players,