From a8edd3e87c20c63e3444c39ba7b7a9ac43d67238 Mon Sep 17 00:00:00 2001 From: terminx Date: Mon, 7 Jul 2008 08:04:12 +0000 Subject: [PATCH] Some days, I just add shit for the hell of it git-svn-id: https://svn.eduke32.com/eduke32@841 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/astub.c | 13 ++++++++++++- polymer/eduke32/source/osdcmds.c | 3 +++ polymer/eduke32/source/premap.c | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 48691fcbf..76e3d294f 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -6668,7 +6668,7 @@ static void addgroup(const char *buffer) static void checkcommandline(int argc, const char **argv) { int i = 1; - char *c; + char *c, *k; if (argc > 1) { @@ -6760,6 +6760,16 @@ static void checkcommandline(int argc, const char **argv) #endif } + k = Bstrchr(c,'.'); + if (k) + { + if (!Bstrcasecmp(k,".grp") || !Bstrcasecmp(k,".zip")) + { + addgroup(argv[i++]); + continue; + } + } + if ((*c == '/') || (*c == '-')) { c++; @@ -7013,6 +7023,7 @@ static int registerosdcommands(void) OSD_RegisterFunction("noclip","noclip: toggles clipping mode", osdcmd_noclip); OSD_RegisterFunction("quit","quit: exits the game immediately", osdcmd_quit); + OSD_RegisterFunction("exit","exit: exits the game immediately", osdcmd_quit); OSD_RegisterFunction("sensitivity","sensitivity : changes the mouse sensitivity", osdcmd_sensitivity); diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index a5ce3384f..67298e539 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "duke3d.h" #include "crc32.h" #include +#include extern int voting, doquicksave; struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat; @@ -673,6 +674,7 @@ cvarmappings cvar[] = { "r_drawweapon", "r_drawweapon: enable/disable weapon drawing", (void*)&ud.drawweapon, CVAR_INT, 0, 0, 2 }, { "r_showfps", "r_showfps: show the frame rate counter", (void*)&ud.tickrate, CVAR_BOOL, 0, 0, 1 }, { "r_precache", "r_precache: enable/disable the pre-level caching routine", (void*)&ud.config.useprecache, CVAR_BOOL, 0, 0, 1 }, + { "r_visibility", "r_visibility: sets the global map visibility", (void*)&ud.const_visibility, CVAR_INT|128, 0, INT_MIN, INT_MAX }, { "snd_ambience", "snd_ambience: enables/disables ambient sounds", (void*)&ud.config.AmbienceToggle, CVAR_BOOL, 0, 0, 1 }, { "snd_duketalk", "snd_duketalk: enables/disables Duke's speech", (void*)&ud.config.VoiceToggle, CVAR_INT, 0, 0, 2 }, @@ -1263,6 +1265,7 @@ int registerosdcommands(void) OSD_RegisterFunction("quicksave","quicksave: performs a quick save", osdcmd_quicksave); OSD_RegisterFunction("quickload","quickload: performs a quick load", osdcmd_quickload); OSD_RegisterFunction("quit","quit: exits the game immediately", osdcmd_quit); + OSD_RegisterFunction("exit","exit: exits the game immediately", osdcmd_quit); OSD_RegisterFunction("rate","rate: sets the multiplayer packet send rate, in packets/sec",osdcmd_rate); OSD_RegisterFunction("restartsound","restartsound: reinitializes the sound system",osdcmd_restartsound); diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 2e3c167c1..071c94025 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -1642,7 +1642,7 @@ int enterlevel(int g) map[(ud.volume_number*MAXLEVELS)+ud.level_number].filename = Bcalloc(BMAX_PATH,sizeof(char)); if (map[(ud.volume_number*MAXLEVELS)+ud.level_number].name == NULL) { - map[(ud.volume_number*MAXLEVELS)+ud.level_number].name = Bcalloc(9,sizeof(char)); + map[(ud.volume_number*MAXLEVELS)+ud.level_number].name = Bcalloc(16,sizeof(char)); Bsprintf(map[(ud.volume_number*MAXLEVELS)+ud.level_number].name,"USER MAP"); } }