From 24ea5c3d91c6aec73b8ef9633bf5a12146055c42 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Fri, 17 Oct 2008 08:19:49 +0000 Subject: Added `mvd_stats_score' variable. Do not change gamedir when parsing MVD stream. Added `--replace' argument to `mvdplay' command. Typing `demo ' in client console will replace any currenly playing MVD with the new demo, just like it happens with regular demos. Export number of active MVD channels into server info. Updated documentation. --- source/sv_user.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'source/sv_user.c') diff --git a/source/sv_user.c b/source/sv_user.c index 87fbf3f..cf4358a 100644 --- a/source/sv_user.c +++ b/source/sv_user.c @@ -734,6 +734,30 @@ static void SV_NoGameData_f( void ) { sv_client->flags ^= CF_NODATA; } +#if USE_PACKETDUP +static void SV_PacketdupHack_f( void ) { + int numdups = sv_client->numpackets - 1; + + if( Cmd_Argc() > 1 ) { + numdups = atoi( Cmd_Argv( 1 ) ); + if( numdups < 0 || numdups > sv_packetdup_hack->integer ) { + SV_ClientPrintf( sv_client, PRINT_HIGH, + "Packetdup of %d is not allowed on this server.\n", numdups ); + return; + } + + sv_client->numpackets = numdups + 1; + } + + SV_ClientPrintf( sv_client, PRINT_HIGH, + "Server is sending %d duplicate packet%s to you.\n", + numdups, numdups == 1 ? "" : "s" ); + if( numdups > 1 ) { + SV_ClientPrintf( sv_client, PRINT_MEDIUM, "Poor, poor server...\n" ); + } +} +#endif + static void SV_CvarResult_f( void ) { char *c, *v; @@ -803,6 +827,9 @@ static const ucmd_t ucmds[] = { { "\177c", SV_CvarResult_f }, { "nogamedata", SV_NoGameData_f }, +#if USE_PACKETDUP + { "packetdup", SV_PacketdupHack_f }, +#endif #if USE_ANTICHEAT & 2 { "aclist", SV_AC_List_f }, { "acinfo", SV_AC_Info_f }, -- cgit v1.2.3