Subversion Repositories eduke32

Rev

Rev 879 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 879 Rev 881
Line 629... Line 629...
629
    return OSDCMD_OK;
629
    return OSDCMD_OK;
630
}
630
}
631
631
632
cvarmappings cvar[] =
632
cvarmappings cvar[] =
633
{
633
{
634
    { "crosshair", "crosshair: enable/disable crosshair", (void*)&ud.crosshair, CVAR_INT, 0, 0, 3 },
634
    { "crosshair", "crosshair: enable/disable crosshair", (void*)&ud.crosshair, CVAR_BOOL, 0, 0, 1 },
635
635
636
    { "cl_autoaim", "cl_autoaim: enable/disable weapon autoaim", (void*)&ud.config.AutoAim, CVAR_INT|CVAR_MULTI, 0, 0, 2 },
636
    { "cl_autoaim", "cl_autoaim: enable/disable weapon autoaim", (void*)&ud.config.AutoAim, CVAR_INT|CVAR_MULTI, 0, 0, 2 },
637
    { "cl_automsg", "cl_automsg: enable/disable automatically sending messages to all players", (void*)&ud.automsg, CVAR_BOOL, 0, 0, 1 },
637
    { "cl_automsg", "cl_automsg: enable/disable automatically sending messages to all players", (void*)&ud.automsg, CVAR_BOOL, 0, 0, 1 },
638
    { "cl_autovote", "cl_autovote: enable/disable automatic voting", (void*)&ud.autovote, CVAR_INT|CVAR_MULTI, 0, 0, 2 },
638
    { "cl_autovote", "cl_autovote: enable/disable automatic voting", (void*)&ud.autovote, CVAR_INT|CVAR_MULTI, 0, 0, 2 },
639
639
Line 1271... Line 1271...
1271
    OSD_Printf("%s\n",parm->raw);
1271
    OSD_Printf("%s\n",parm->raw);
1272
    setgamma();
1272
    setgamma();
1273
    return OSDCMD_OK;
1273
    return OSDCMD_OK;
1274
}
1274
}
1275
1275
-
 
1276
static int osdcmd_setcrosshairscale(const osdfuncparm_t *parm)
-
 
1277
{
-
 
1278
    if (parm->numparms == 0)
-
 
1279
    {
-
 
1280
        OSD_Printf("\"cl_crosshairscale\" is \"%d\"\n", ud.crosshairscale);
-
 
1281
        return OSDCMD_SHOWHELP;
-
 
1282
    }
-
 
1283
    else if (parm->numparms != 1) return OSDCMD_SHOWHELP;
-
 
1284
-
 
1285
    ud.crosshairscale = min(100,max(10,Batol(parm->parms[0])));
-
 
1286
    OSD_Printf("cl_statusbarscale %d\n", ud.crosshairscale);
-
 
1287
    return OSDCMD_OK;
-
 
1288
}
-
 
1289
1276
int registerosdcommands(void)
1290
int registerosdcommands(void)
1277
{
1291
{
1278
    unsigned int i;
1292
    unsigned int i;
1279
1293
1280
    osdcmd_cheatsinfo_stat.cheatnum = -1;
1294
    osdcmd_cheatsinfo_stat.cheatnum = -1;
Line 1295... Line 1309...
1295
    OSD_RegisterFunction("addpath","addpath <path>: adds path to game filesystem", osdcmd_addpath);
1309
    OSD_RegisterFunction("addpath","addpath <path>: adds path to game filesystem", osdcmd_addpath);
1296
1310
1297
    OSD_RegisterFunction("bind","bind <key> <string>: associates a keypress with a string of console input. Type \"bind showkeys\" for a list of keys and \"listsymbols\" for a list of valid console commands.", osdcmd_bind);
1311
    OSD_RegisterFunction("bind","bind <key> <string>: associates a keypress with a string of console input. Type \"bind showkeys\" for a list of keys and \"listsymbols\" for a list of valid console commands.", osdcmd_bind);
1298
1312
1299
    OSD_RegisterFunction("cl_statusbarscale","cl_statusbarscale: changes the status bar scale", osdcmd_setstatusbarscale);
1313
    OSD_RegisterFunction("cl_statusbarscale","cl_statusbarscale: changes the status bar scale", osdcmd_setstatusbarscale);
-
 
1314
    OSD_RegisterFunction("cl_crosshairscale","cl_crosshairscale: changes the crosshair scale", osdcmd_setcrosshairscale);
1300
    OSD_RegisterFunction("cmenu","cmenu <#>: jumps to menu", osdcmd_cmenu);
1315
    OSD_RegisterFunction("cmenu","cmenu <#>: jumps to menu", osdcmd_cmenu);
1301
1316
1302
    OSD_RegisterFunction("echo","echo [text]: echoes text to the console", osdcmd_echo);
1317
    OSD_RegisterFunction("echo","echo [text]: echoes text to the console", osdcmd_echo);
1303
1318
1304
    OSD_RegisterFunction("fileinfo","fileinfo <file>: gets a file's information", osdcmd_fileinfo);
1319
    OSD_RegisterFunction("fileinfo","fileinfo <file>: gets a file's information", osdcmd_fileinfo);