mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed issue with particles disappering
This commit is contained in:
parent
f62a215b70
commit
34b1177b99
|
@ -203,21 +203,21 @@ void effect_explosion(vec2 pos)
|
|||
|
||||
void effects_update()
|
||||
{
|
||||
static float last_update_100hz = 0;
|
||||
static float last_update_50hz = 0;
|
||||
static int64 last_update_100hz = 0;
|
||||
static int64 last_update_50hz = 0;
|
||||
|
||||
if(client_localtime()-last_update_100hz > 0.01f)
|
||||
if(time_get()-last_update_100hz > time_freq()/100)
|
||||
{
|
||||
add_100hz = true;
|
||||
last_update_100hz = client_localtime();
|
||||
last_update_100hz = time_get();
|
||||
}
|
||||
else
|
||||
add_100hz = false;
|
||||
|
||||
if(client_localtime()-last_update_50hz > 0.02f)
|
||||
if(time_get()-last_update_50hz > time_freq()/100)
|
||||
{
|
||||
add_50hz = true;
|
||||
last_update_50hz = client_localtime();
|
||||
last_update_50hz = time_get();
|
||||
}
|
||||
else
|
||||
add_50hz = false;
|
||||
|
|
Loading…
Reference in a new issue