From 4b053322f3e40a5fbc2f73938b75a4a91c3469fa Mon Sep 17 00:00:00 2001 From: Alfred Eriksson Date: Mon, 17 Nov 2008 16:08:24 +0000 Subject: [PATCH] client can only start a recording when in the game --- src/engine/client/ec_client.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/engine/client/ec_client.c b/src/engine/client/ec_client.c index d6e1419a9..855effc74 100644 --- a/src/engine/client/ec_client.c +++ b/src/engine/client/ec_client.c @@ -1799,9 +1799,14 @@ static void con_play(void *result, void *user_data) static void con_record(void *result, void *user_data) { - char filename[512]; - str_format(filename, sizeof(filename), "demos/%s.demo", console_arg_string(result, 0)); - demorec_record_start(filename, modc_net_version(), current_map, current_map_crc, "client"); + if(state != CLIENTSTATE_ONLINE) + dbg_msg("demorec/record", "client is not online"); + else + { + char filename[512]; + str_format(filename, sizeof(filename), "demos/%s.demo", console_arg_string(result, 0)); + demorec_record_start(filename, modc_net_version(), current_map, current_map_crc, "client"); + } } static void con_stoprecord(void *result, void *user_data)