This commit is contained in:
aozhiwei 2023-04-21 16:44:32 +08:00
parent 01fd126f0e
commit 0c6a2b6f6d
3 changed files with 5 additions and 1 deletions

View File

@ -70,7 +70,8 @@ void Incubator::AllocAndroid(Human* target, int num, std::vector<Human*>* androi
if (!room->xtimer.IsRunning()) {
A8_ABORT();
}
if (target->room->IsGameOver()) {
if (target->room->IsGameOver() ||
target->room->IsForceOver()) {
return;
}
int try_count = 0;

View File

@ -3751,6 +3751,7 @@ void Room::ForceOver()
return true;
});
}
force_over_ = true;
GameLog::Instance()->ForceOver(this);
xtimer.SetTimeoutEx
(SERVER_FRAME_RATE * 5,

View File

@ -92,6 +92,7 @@ public:
long long GetBattleStartFrameNo() { return battle_start_frameno_; }
bool IsGameOver() { return game_over_; }
bool IsGameTimeOut() { return game_timeout_; }
bool IsForceOver() { return force_over_; }
const GasData& GetGasData() { return gas_data_; }
RoomType_e GetRoomType() { return room_type_; }
RoomMode_e GetRoomMode() { return room_mode_; }
@ -394,6 +395,7 @@ private:
FrameCallNode* work_node_ = nullptr;
Team* victory_team_ = nullptr;
bool force_over_ = false;
friend class Incubator;
friend class Team;