This is an automated email from the git hooks/post-receive script. smcv pushed a commit to branch debian/master in repository openjk.
commit 8b07e58c1c2875e94823c8afe5443e003370349b Author: Razish <[email protected]> Date: Wed Dec 6 23:49:59 2017 +1100 [MP] Rename sv_legacyFixForceSelect to sv_legacyFixes, also force roll angle Default sv_filterCommands to 1, move ';' filtering to value 2 --- codemp/server/server.h | 2 +- codemp/server/sv_client.cpp | 20 +++++++++++++++----- codemp/server/sv_init.cpp | 8 ++++---- codemp/server/sv_main.cpp | 4 ++-- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/codemp/server/server.h b/codemp/server/server.h index 9f4839a..e64b97e 100644 --- a/codemp/server/server.h +++ b/codemp/server/server.h @@ -270,7 +270,7 @@ extern cvar_t *sv_filterCommands; extern cvar_t *sv_autoDemo; extern cvar_t *sv_autoDemoBots; extern cvar_t *sv_autoDemoMaxMaps; -extern cvar_t *sv_legacyFixForceSelect; +extern cvar_t *sv_legacyFixes; extern cvar_t *sv_banFile; extern serverBan_t serverBans[SERVER_MAXBANS]; diff --git a/codemp/server/sv_client.cpp b/codemp/server/sv_client.cpp index f6f9635..d88ed6e 100644 --- a/codemp/server/sv_client.cpp +++ b/codemp/server/sv_client.cpp @@ -1285,8 +1285,13 @@ void SV_ExecuteClientCommand( client_t *cl, const char *s, qboolean clientOK ) { // pass unknown strings to the game if (!u->name && sv.state == SS_GAME && (cl->state == CS_ACTIVE || cl->state == CS_PRIMED)) { // strip \r \n and ; - if ( sv_filterCommands->integer ) - Cmd_Args_Sanitize(); + if ( sv_filterCommands->integer ) { + Cmd_Args_Sanitize( MAX_CVAR_VALUE_STRING, "\n\r", " " ); + if ( sv_filterCommands->integer == 2 ) { + // also strip ';' for callvote + Cmd_Args_Sanitize( MAX_CVAR_VALUE_STRING, ";", " " ); + } + } GVM_ClientCommand( cl - svs.clients ); } } @@ -1419,9 +1424,14 @@ static void SV_UserMove( client_t *cl, msg_t *msg, qboolean delta ) { for ( i = 0 ; i < cmdCount ; i++ ) { cmd = &cmds[i]; MSG_ReadDeltaUsercmdKey( msg, key, oldcmd, cmd ); - if ( sv_legacyFixForceSelect->integer && (cmd->forcesel == FP_LEVITATION || cmd->forcesel >= NUM_FORCE_POWERS) ) - { - cmd->forcesel = 0xFFu; + if ( sv_legacyFixes->integer ) { + // block "charge jump" and other nonsense + if ( cmd->forcesel == FP_LEVITATION || cmd->forcesel >= NUM_FORCE_POWERS ) { + cmd->forcesel = 0xFFu; + } + + // affects speed calculation + cmd->angles[ROLL] = 0; } oldcmd = cmd; } diff --git a/codemp/server/sv_init.cpp b/codemp/server/sv_init.cpp index 1ad1fbf..0a29a43 100644 --- a/codemp/server/sv_init.cpp +++ b/codemp/server/sv_init.cpp @@ -951,8 +951,8 @@ void SV_Init (void) { Cvar_CheckRange( sv_privateClients, 0, MAX_CLIENTS, qtrue ); sv_hostname = Cvar_Get ("sv_hostname", "*Jedi*", CVAR_SERVERINFO | CVAR_ARCHIVE, "The name of the server that is displayed in the serverlist" ); sv_maxclients = Cvar_Get ("sv_maxclients", "8", CVAR_SERVERINFO | CVAR_LATCH, "Max. connected clients" ); - - + + //cvar_t *sv_ratePolicy; // 1-2 //cvar_t *sv_clientRate; sv_ratePolicy = Cvar_Get( "sv_ratePolicy", "1", CVAR_ARCHIVE_ND, "Determines which policy of enforcement is used for client's \"rate\" cvar" ); @@ -997,7 +997,7 @@ void SV_Init (void) { sv_mapChecksum = Cvar_Get ("sv_mapChecksum", "", CVAR_ROM); sv_lanForceRate = Cvar_Get ("sv_lanForceRate", "1", CVAR_ARCHIVE_ND ); - sv_filterCommands = Cvar_Get( "sv_filterCommands", "0", CVAR_ARCHIVE ); + sv_filterCommands = Cvar_Get( "sv_filterCommands", "1", CVAR_ARCHIVE ); // sv_debugserver = Cvar_Get ("sv_debugserver", "0", 0); @@ -1005,7 +1005,7 @@ void SV_Init (void) { sv_autoDemoBots = Cvar_Get( "sv_autoDemoBots", "0", CVAR_ARCHIVE_ND, "Record server-side demos for bots" ); sv_autoDemoMaxMaps = Cvar_Get( "sv_autoDemoMaxMaps", "0", CVAR_ARCHIVE_ND ); - sv_legacyFixForceSelect = Cvar_Get( "sv_legacyFixForceSelect", "1", CVAR_ARCHIVE ); + sv_legacyFixes = Cvar_Get( "sv_legacyFixes", "1", CVAR_ARCHIVE ); sv_banFile = Cvar_Get( "sv_banFile", "serverbans.dat", CVAR_ARCHIVE, "File to use to store bans and exceptions" ); diff --git a/codemp/server/sv_main.cpp b/codemp/server/sv_main.cpp index 6c61869..a968c4d 100644 --- a/codemp/server/sv_main.cpp +++ b/codemp/server/sv_main.cpp @@ -62,11 +62,11 @@ cvar_t *sv_pure; cvar_t *sv_floodProtect; cvar_t *sv_lanForceRate; // dedicated 1 (LAN) server forces local client rates to 99999 (bug #491) cvar_t *sv_needpass; -cvar_t *sv_filterCommands; // strict filtering on commands (replace: \r \n ;) +cvar_t *sv_filterCommands; // strict filtering on commands (1: strip ['\r', '\n'], 2: also strip ';') cvar_t *sv_autoDemo; cvar_t *sv_autoDemoBots; cvar_t *sv_autoDemoMaxMaps; -cvar_t *sv_legacyFixForceSelect; +cvar_t *sv_legacyFixes; cvar_t *sv_banFile; serverBan_t serverBans[SERVER_MAXBANS]; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openjk.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

