]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
make -1 as bindmap argument also work, to mean "current bindmap" (same as leaving...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 Jul 2010 19:48:56 +0000 (19:48 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 Jul 2010 19:48:56 +0000 (19:48 +0000)
From: Rudolf Polzer <divverent@alientrap.org>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10271 d7cf8633-e32d-0410-b094-e92efae38249

keys.c
prvm_cmds.c

diff --git a/keys.c b/keys.c
index 981e2f24d7bf71d75e04167ac6185dd2fce3a77b..40ecfde2e25c3ccb6420fdf98e2bda0b1f9ac177 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -1405,7 +1405,7 @@ void Key_FindKeysForCommand (const char *command, int *keys, int numkeys, int bi
 {
        int             count;
        int             j;
-       char    *b;
+       const char      *b;
 
        for (j = 0;j < numkeys;j++)
                keys[j] = -1;
index 2ddf0afbdffeebbd257fcb91c48bce879bb5ee9f..0781f0e21ad0bae70b605dfc9222485c07746906 100644 (file)
@@ -3921,7 +3921,7 @@ void VM_findkeysforcommand(void)
 
        cmd = PRVM_G_STRING(OFS_PARM0);
        if(prog->argc == 2)
-               bindmap = bound(0, PRVM_G_FLOAT(OFS_PARM1), MAX_BINDMAPS-1);
+               bindmap = bound(-1, PRVM_G_FLOAT(OFS_PARM1), MAX_BINDMAPS-1);
        else
                bindmap = -1;
 
@@ -3962,7 +3962,7 @@ void VM_getkeybind (void)
        int bindmap;
        VM_SAFEPARMCOUNTRANGE(1, 2, VM_CL_getkeybind);
        if(prog->argc == 2)
-               bindmap = bound(0, PRVM_G_FLOAT(OFS_PARM1), MAX_BINDMAPS-1);
+               bindmap = bound(-1, PRVM_G_FLOAT(OFS_PARM1), MAX_BINDMAPS-1);
        else
                bindmap = -1;