merge master

This commit is contained in:
aozhiwei 2019-04-26 09:48:01 +08:00
commit ccda49a1d7
2 changed files with 7 additions and 0 deletions

View File

@ -111,6 +111,9 @@ void AndroidAI::DoAttack()
a8::HasBitFlag(hum->status, HS_Jump)) { a8::HasBitFlag(hum->status, HS_Jump)) {
return; return;
} }
if (hum->room->gas_data.gas_mode == GasInactive) {
return;
}
if (owner->updated_times % 10 == 0) { if (owner->updated_times % 10 == 0) {
Human* enemy = owner->room->FindEnemy((Human*)owner); Human* enemy = owner->room->FindEnemy((Human*)owner);
if (enemy) { if (enemy) {

View File

@ -84,6 +84,10 @@ void Room::UnInit()
void Room::Update(int delta_time) void Room::Update(int delta_time)
{ {
if (game_over && frame_no - game_over_frameno > SERVER_FRAME_RATE * 20) {
return;
}
long long begin_tick = a8::XGetTickCount(); long long begin_tick = a8::XGetTickCount();
elapsed_time_ += delta_time; elapsed_time_ += delta_time;
while (elapsed_time_ >= 50) { while (elapsed_time_ >= 50) {