This commit is contained in:
aozhiwei 2023-10-11 14:08:08 +08:00
parent 7aff0ef65f
commit 51611facf3

View File

@ -13,6 +13,7 @@
#include "httpproxy.h"
#include "roommgr.h"
#include "mt/Param.h"
#include "mt/Map.h"
#include "mt/Hero.h"
#include "mt/PveGemini.h"
@ -504,4 +505,19 @@ void Team::IncKillCount()
{
++kill_count_;
last_kill_frameno_ = room->GetFrameNo();
if (room->IsMobaModeRoom() && kill_count_ >= mt::Param::s().moba_kill_times) {
room->xtimer.SetTimeoutWpEx
(NEXT_FRAME_TIMER,
[this] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
if (!room->IsGameOver()) {
room->game_over_ = true;
room->game_over_frameno_ = room->GetFrameNo();
room->OnGameOver();
}
}
},
&room->xtimer_attacher_);
}
}