diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-10-17 08:19:49 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-10-17 08:19:49 +0000 |
commit | 24ea5c3d91c6aec73b8ef9633bf5a12146055c42 (patch) | |
tree | e3ef9d167548c8443082336e54a03d28b3502773 /source/sv_user.c | |
parent | 58c8e2e0377eddcae7f44d30b78578fbedf0eaa7 (diff) |
Added `mvd_stats_score' variable.
Do not change gamedir when parsing MVD stream.
Added `--replace' argument to `mvdplay' command.
Typing `demo <something.mvd2>' 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.
Diffstat (limited to 'source/sv_user.c')
-rw-r--r-- | source/sv_user.c | 27 |
1 files changed, 27 insertions, 0 deletions
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 }, |