From cc576906a318007e789f6dec9fb9b1a75c3ce62e Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Fri, 19 Dec 2008 11:59:58 +0000 Subject: [PATCH] improved the demo players scrubbing capabilities --- src/engine/client/ec_client.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/engine/client/ec_client.c b/src/engine/client/ec_client.c index e4d0b7f8b..f4bc902c8 100644 --- a/src/engine/client/ec_client.c +++ b/src/engine/client/ec_client.c @@ -1295,9 +1295,7 @@ const DEMOPLAYBACK_INFO *client_demoplayer_getinfo() void client_demoplayer_setpos(float percent) { - const DEMOREC_PLAYBACKINFO *info = demorec_playback_info(); - int point = (int)(info->seekable_points*percent); - demorec_playback_set(point); + demorec_playback_set(percent); } void client_demoplayer_setspeed(float speed) @@ -1441,12 +1439,12 @@ static void client_update() } 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!"); client_disconnect(); action_taken = now; - } + }*/ } } @@ -1666,7 +1664,9 @@ static void client_run() break; /* 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); if(config.dbg_hitch)