1
This commit is contained in:
parent
fb9c08148d
commit
674173034b
@ -597,6 +597,7 @@ void Human::FindPathInMapService()
|
|||||||
|
|
||||||
void Human::FillSMGameOver(cs::SMGameOver& msg)
|
void Human::FillSMGameOver(cs::SMGameOver& msg)
|
||||||
{
|
{
|
||||||
|
int alive_team_num = room->GetAliveTeamNum();
|
||||||
if (stats.rank <= 0) {
|
if (stats.rank <= 0) {
|
||||||
std::vector<Human*> human_list;
|
std::vector<Human*> human_list;
|
||||||
room->TraverseHumanList(a8::XParams(),
|
room->TraverseHumanList(a8::XParams(),
|
||||||
@ -635,7 +636,7 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (room->GetAliveTeamNum() == 1) {
|
if (alive_team_num == 1) {
|
||||||
if (room->GetAliveTeam() == GetTeam()) {
|
if (room->GetAliveTeam() == GetTeam()) {
|
||||||
rank = 1;
|
rank = 1;
|
||||||
}
|
}
|
||||||
@ -644,14 +645,14 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (MetaMgr::Instance()->watchable) {
|
if (MetaMgr::Instance()->watchable) {
|
||||||
msg.set_watchable(dead);
|
msg.set_watchable(dead || (alive_team_num == 1));
|
||||||
} else {
|
} else {
|
||||||
msg.set_watchable(false);
|
msg.set_watchable(false);
|
||||||
}
|
}
|
||||||
msg.set_team_id(team_id);
|
msg.set_team_id(team_id);
|
||||||
msg.set_team_rank(stats.rank);
|
msg.set_team_rank(stats.rank);
|
||||||
msg.set_team_allcnt(1);
|
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_victory(!dead);
|
||||||
msg.set_room_uuid(a8::XValue(room->GetRoomUuid()));
|
msg.set_room_uuid(a8::XValue(room->GetRoomUuid()));
|
||||||
msg.set_total_human_num(room->GetHumanNum());
|
msg.set_total_human_num(room->GetHumanNum());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user