This commit is contained in:
aozhiwei 2024-04-03 17:04:06 +08:00
parent 434b7a8ed9
commit 392c01e20c

View File

@ -2213,6 +2213,13 @@ void Room::OnGameOver()
}); });
return; return;
} else { } else {
TraverseHumanList
(
[] (Human* ele_hum) -> bool
{
ele_hum->SendGameOver();
return true;
});
xtimer.SetIntervalEx xtimer.SetIntervalEx
(SERVER_FRAME_RATE / 0.5, (SERVER_FRAME_RATE / 0.5,
[this, frameno = GetFrameNo()] (int event, const a8::Args* args) [this, frameno = GetFrameNo()] (int event, const a8::Args* args)
@ -2223,7 +2230,7 @@ void Room::OnGameOver()
( (
[&all_sent] (Team* team) -> bool [&all_sent] (Team* team) -> bool
{ {
if (team->HasPlayer() && team->IsViewTeam() && if (team->HasPlayer() && !team->IsViewTeam() &&
!team->IsAlreadyReportBattle()) { !team->IsAlreadyReportBattle()) {
all_sent = false; all_sent = false;
return false; return false;
@ -3981,6 +3988,13 @@ void Room::TryRoomReport(int try_count)
if (room) { if (room) {
room->already_room_report_battle_ = true; room->already_room_report_battle_ = true;
room->sending_room_report_battle_ = false; room->sending_room_report_battle_ = false;
room->TraverseHumanList
(
[] (Human* ele_hum) -> bool
{
ele_hum->SendGameOver();
return true;
});
room->StartOverTimer(); room->StartOverTimer();
} }
}, },