This commit is contained in:
aozhiwei 2021-09-10 03:28:57 +00:00
parent fb9c08148d
commit 674173034b

View File

@ -597,6 +597,7 @@ void Human::FindPathInMapService()
void Human::FillSMGameOver(cs::SMGameOver& msg)
{
int alive_team_num = room->GetAliveTeamNum();
if (stats.rank <= 0) {
std::vector<Human*> human_list;
room->TraverseHumanList(a8::XParams(),
@ -635,7 +636,7 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
break;
}
}
if (room->GetAliveTeamNum() == 1) {
if (alive_team_num == 1) {
if (room->GetAliveTeam() == GetTeam()) {
rank = 1;
}
@ -644,14 +645,14 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
}
if (MetaMgr::Instance()->watchable) {
msg.set_watchable(dead);
msg.set_watchable(dead || (alive_team_num == 1));
} else {
msg.set_watchable(false);
}
msg.set_team_id(team_id);
msg.set_team_rank(stats.rank);
msg.set_team_allcnt(1);
msg.set_game_over(room->IsGameOver());
msg.set_game_over(room->IsGameOver() || (alive_team_num == 1));
msg.set_victory(!dead);
msg.set_room_uuid(a8::XValue(room->GetRoomUuid()));
msg.set_total_human_num(room->GetHumanNum());