improved the demo players scrubbing capabilities

This commit is contained in:
Magnus Auvinen 2008-12-19 11:59:58 +00:00
parent e447ef04cc
commit cc576906a3

View file

@ -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)