1
This commit is contained in:
parent
3ad1dda451
commit
f3ba4ae130
@ -146,18 +146,18 @@ int App::Run()
|
||||
int ret = 0;
|
||||
a8::UdpLog::Instance()->Info("gameserver running", {});
|
||||
last_run_tick_ = a8::XGetTickCount();
|
||||
int delta_time = 0;
|
||||
while (!terminated) {
|
||||
a8::tick_t begin_tick = a8::XGetTickCount();
|
||||
Global::g_nowtime = time(nullptr);
|
||||
int delta_time = a8::XGetTickCount() - last_run_tick_;
|
||||
QuickExecute(delta_time);
|
||||
SlowerExecute(delta_time);
|
||||
Schedule();
|
||||
a8::tick_t end_tick = a8::XGetTickCount();
|
||||
if (end_tick - begin_tick > perf.max_run_delay_time) {
|
||||
perf.max_run_delay_time = end_tick - begin_tick;
|
||||
}
|
||||
Schedule();
|
||||
last_run_tick_ = a8::XGetTickCount();
|
||||
delta_time = end_tick - begin_tick;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ Bullet::Bullet():Entity()
|
||||
{
|
||||
entity_type = ET_Bullet;
|
||||
movement = new MovementComponent();
|
||||
movement->owner = this;
|
||||
}
|
||||
|
||||
Bullet::~Bullet()
|
||||
|
@ -11,6 +11,7 @@
|
||||
Human::Human()
|
||||
{
|
||||
movement = new MovementComponent();
|
||||
movement->owner = this;
|
||||
}
|
||||
|
||||
Human::~Human()
|
||||
|
Loading…
x
Reference in New Issue
Block a user