mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
client can only start a recording when in the game
This commit is contained in:
parent
47e50c5f20
commit
4b053322f3
|
@ -1799,9 +1799,14 @@ static void con_play(void *result, void *user_data)
|
||||||
|
|
||||||
static void con_record(void *result, void *user_data)
|
static void con_record(void *result, void *user_data)
|
||||||
{
|
{
|
||||||
|
if(state != CLIENTSTATE_ONLINE)
|
||||||
|
dbg_msg("demorec/record", "client is not online");
|
||||||
|
else
|
||||||
|
{
|
||||||
char filename[512];
|
char filename[512];
|
||||||
str_format(filename, sizeof(filename), "demos/%s.demo", console_arg_string(result, 0));
|
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");
|
demorec_record_start(filename, modc_net_version(), current_map, current_map_crc, "client");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void con_stoprecord(void *result, void *user_data)
|
static void con_stoprecord(void *result, void *user_data)
|
||||||
|
|
Loading…
Reference in a new issue