1
This commit is contained in:
parent
00bf176e4f
commit
9de94b999d
@ -3821,6 +3821,13 @@ void Human::CalcStats()
|
||||
}
|
||||
} if (room->IsMobaModeRoom()) {
|
||||
stats->victory = GetTeam() == room->GetVictoryTeam();
|
||||
if (GetTeam() == room->GetVictoryTeam()) {
|
||||
GetTeam()->team_rank = 1;
|
||||
room->GetMobaEnemyTeam(GetTeam())->team_rank = 2;
|
||||
} else {
|
||||
GetTeam()->team_rank = 2;
|
||||
room->GetMobaEnemyTeam(GetTeam())->team_rank = 1;
|
||||
}
|
||||
if (GetTeam()->team_rank == 1) {
|
||||
stats->settlement_color = 1;
|
||||
GetTeam()->settlement_color = 1;
|
||||
|
@ -3676,3 +3676,12 @@ int Room::GetMobaLeftTime()
|
||||
long long remain_time = xtimer.GetRemainTime(moba_over_timer);
|
||||
return (remain_time * FRAME_RATE_MS);
|
||||
}
|
||||
|
||||
Team* Room::GetMobaEnemyTeam(Team* self_team)
|
||||
{
|
||||
if (self_team == GetMobaTeamA()) {
|
||||
return GetMobaTeamB();
|
||||
} else {
|
||||
return GetMobaTeamA();
|
||||
}
|
||||
}
|
||||
|
@ -279,6 +279,7 @@ public:
|
||||
int GetMobaLeftTime();
|
||||
Team* GetMobaTeamA() { return moba_team_a_; }
|
||||
Team* GetMobaTeamB() { return moba_team_b_; }
|
||||
Team* GetMobaEnemyTeam(Team* self_team);
|
||||
RoomAgent* GetRoomAgent() { return room_agent_; }
|
||||
int GenShotUniid() { return ++current_shot_uniid_; }
|
||||
int InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<cs::CMJoin> msg,
|
||||
|
Loading…
x
Reference in New Issue
Block a user