[PATCH] OSP commands in server console


(tjw) #1

In the et server console, you cannot use any of the OSP ‘ref’ commands. This is caused by a bug in arg passing. The cmd var ALWAYS contains ‘ref’ and G_refCommandCheck() expects the next arguement (e.g. warn, putaxis, lock, etc.)

The following 1 line patch appears to fix the issue. All ref commands seem to work from the server console with this patch except ‘restart’, but there’s something else wrong with that.


diff -urN et.orig/src/game/g_svcmds.c et/src/game/g_svcmds.c     
--- et.orig/src/game/g_svcmds.c 2003-07-31 17:29:48.000000000 -0500
+++ et/src/game/g_svcmds.c      2004-05-07 15:31:06.000000000 -0500
@@ -1037,6 +1037,7 @@
 
                // OSP - console also gets ref commands
                if(!level.fLocalHost && Q_stricmp(cmd, "ref") == 0) {
+                       trap_Argv(1, cmd, sizeof(cmd));
                        if(!G_refCommandCheck(NULL, cmd)) {
                                G_refHelp_cmd(NULL);
                        }

Please incorporate this fix into your mods.


(Distopia) #2

Thanks, tjw. Every bugfix given to the community is one less buggy mod given back to the community.