This commit is contained in:
aozhiwei 2022-09-26 13:11:36 +08:00
parent e62c621d5b
commit 0c0e5e9c49
2 changed files with 5 additions and 6 deletions

View File

@ -963,10 +963,11 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
if (room->IsPveRoom()) {
} else {
stats.victory = stats.rank == 1;
if (GetTeam()->GetAliveNum() <= 0) {
GetTeam()->team_rank = room->GetAliveTeamNum();
}
if (stats.victory) {
stats.team_rank = 1;
} else {
stats.team_rank = room->GetAliveTeamNum();
GetTeam()->team_rank = 1;
}
}
}
@ -974,7 +975,6 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
if (stats.pve_kill_boss) {
stats.victory = true;
}
} else {
}
if (stats.victory) {
@ -992,7 +992,7 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
}
msg.set_map_id(room->GetMapMeta()->i->map_id());
msg.set_team_id(team_id);
msg.set_team_rank(stats.team_rank);
msg.set_team_rank(GetTeam()->team_rank);
msg.set_personal_rank(stats.rank);
if (room->IsPveRoom()) {
msg.set_game_over(room->IsGameOver());

View File

@ -98,7 +98,6 @@ struct PlayerStats
int weapon_id = 0;
int rank = 0;
int team_rank = 0;
int skill_times = 0;
bool victory = false;