1
This commit is contained in:
parent
8f5c31284c
commit
245277a7be
@ -1037,7 +1037,7 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
|
|||||||
{
|
{
|
||||||
msg.set_total_team_num(room->GetTeamNum());
|
msg.set_total_team_num(room->GetTeamNum());
|
||||||
if (room->IsPveRoom()) {
|
if (room->IsPveRoom()) {
|
||||||
msg.set_pve_wave(room->pve_data.GetWave());
|
msg.set_pve_wave(room->pve_data.GetWave() + 1);
|
||||||
msg.set_pve_max_wave(room->pve_data.max_wave);
|
msg.set_pve_max_wave(room->pve_data.max_wave);
|
||||||
msg.set_pve_instance_id(room->pve_instance->pb->gemini_id());
|
msg.set_pve_instance_id(room->pve_instance->pb->gemini_id());
|
||||||
}
|
}
|
||||||
@ -1058,7 +1058,7 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
|
|||||||
{
|
{
|
||||||
if (room->IsPveRoom()) {
|
if (room->IsPveRoom()) {
|
||||||
msg.set_mode(GetTeam()->GetMemberNum() <= 1 ? 1 : 2);
|
msg.set_mode(GetTeam()->GetMemberNum() <= 1 ? 1 : 2);
|
||||||
msg.set_my_rank(room->pve_data.GetWave());
|
msg.set_my_rank(room->pve_data.GetWave() + 1);
|
||||||
msg.set_max_rank(room->pve_data.max_wave);
|
msg.set_max_rank(room->pve_data.max_wave);
|
||||||
} else {
|
} else {
|
||||||
if (GetTeam()->GetMemberNum() <= 1) {
|
if (GetTeam()->GetMemberNum() <= 1) {
|
||||||
|
@ -383,12 +383,6 @@ int Incubator::GetPveLeftTime()
|
|||||||
return remain_time * FRAME_RATE_MS;
|
return remain_time * FRAME_RATE_MS;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Incubator::IsLastWave()
|
|
||||||
{
|
|
||||||
return room->pve_data.GetWave() >= room->pve_mode_meta->waves.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Incubator::NextWave()
|
void Incubator::NextWave()
|
||||||
{
|
{
|
||||||
if (room->pve_data.GetWave() < wave_timers_.size()) {
|
if (room->pve_data.GetWave() < wave_timers_.size()) {
|
||||||
|
@ -16,7 +16,6 @@ class Incubator
|
|||||||
void ActiveAndroid(Human* hum, Human* android);
|
void ActiveAndroid(Human* hum, Human* android);
|
||||||
bool IsTimeOut() { return timeout_; };
|
bool IsTimeOut() { return timeout_; };
|
||||||
int GetPveLeftTime();
|
int GetPveLeftTime();
|
||||||
bool IsLastWave();
|
|
||||||
void NextWave();
|
void NextWave();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1193,13 +1193,8 @@ void Room::UpdateGas()
|
|||||||
(
|
(
|
||||||
pve_data.pve_kill_boss ||
|
pve_data.pve_kill_boss ||
|
||||||
IsAllRealDead() ||
|
IsAllRealDead() ||
|
||||||
incubator_->IsTimeOut() ||
|
incubator_->IsTimeOut()
|
||||||
(
|
)) {
|
||||||
incubator_->IsLastWave() &&
|
|
||||||
pve_data.refreshed_mon > 0 &&
|
|
||||||
pve_data.killed_num >= pve_data.refreshed_mon)
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
game_over_ = true;
|
game_over_ = true;
|
||||||
game_over_frameno_ = GetFrameNo();
|
game_over_frameno_ = GetFrameNo();
|
||||||
OnGameOver();
|
OnGameOver();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user