mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
improved the demo players scrubbing capabilities
This commit is contained in:
parent
e447ef04cc
commit
cc576906a3
|
@ -1295,9 +1295,7 @@ const DEMOPLAYBACK_INFO *client_demoplayer_getinfo()
|
||||||
|
|
||||||
void client_demoplayer_setpos(float percent)
|
void client_demoplayer_setpos(float percent)
|
||||||
{
|
{
|
||||||
const DEMOREC_PLAYBACKINFO *info = demorec_playback_info();
|
demorec_playback_set(percent);
|
||||||
int point = (int)(info->seekable_points*percent);
|
|
||||||
demorec_playback_set(point);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void client_demoplayer_setspeed(float speed)
|
void client_demoplayer_setspeed(float speed)
|
||||||
|
@ -1441,12 +1439,12 @@ static void client_update()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(now > action_taken+time_freq()*(10+config.dbg_stress))
|
/*if(now > action_taken+time_freq()*(10+config.dbg_stress))
|
||||||
{
|
{
|
||||||
dbg_msg("stress", "disconnecting!");
|
dbg_msg("stress", "disconnecting!");
|
||||||
client_disconnect();
|
client_disconnect();
|
||||||
action_taken = now;
|
action_taken = now;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1666,7 +1664,9 @@ static void client_run()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* be nice */
|
/* be nice */
|
||||||
if(config.cl_cpu_throttle || !gfx_window_active())
|
if(config.dbg_stress)
|
||||||
|
thread_sleep(5);
|
||||||
|
else if(config.cl_cpu_throttle || !gfx_window_active())
|
||||||
thread_sleep(1);
|
thread_sleep(1);
|
||||||
|
|
||||||
if(config.dbg_hitch)
|
if(config.dbg_hitch)
|
||||||
|
|
Loading…
Reference in a new issue