修复room定时器问题

This commit is contained in:
aozhiwei 2019-05-06 17:44:45 +08:00
parent d08fc79ffa
commit 537a7cab4e

View File

@ -85,6 +85,7 @@ void Room::UnInit()
void Room::Update(int delta_time)
{
xtimer.Update();
if (game_over && frame_no - game_over_frameno > SERVER_FRAME_RATE * 20) {
return;
}
@ -92,7 +93,6 @@ void Room::Update(int delta_time)
long long begin_tick = a8::XGetTickCount();
elapsed_time_ += delta_time;
while (elapsed_time_ >= 50) {
xtimer.Update();
if (frame_no % 2 == 0) {
UpdateGas();
}