From 57348c1fdc08faf4e9737ef76cf8d5ab6d28dea8 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Mon, 1 Oct 2012 17:52:47 +0000 Subject: [PATCH] Mapster32: make 'corruptcheck_noalreadyrefd' a separate OSD command. Instead of having 'noalreadyrefd' as a 'corruptcheck' subcommand. This way, TAB completion can be had. git-svn-id: https://svn.eduke32.com/eduke32@3047 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/astub.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index c5ba7df37..9d2146f77 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -9050,20 +9050,20 @@ static int32_t osdcmd_vars_pk(const osdfuncparm_t *parm) else return OSDCMD_SHOWHELP; } + else if (!Bstrcasecmp(parm->name, "corruptcheck_noalreadyrefd")) + { + corruptcheck_noalreadyrefd = !corruptcheck_noalreadyrefd; + OSD_Printf("%s 'already referenced' corruption\n", + corruptcheck_noalreadyrefd?"Ignore":"Regard"); + return OSDCMD_OK; + } else if (!Bstrcasecmp(parm->name, "corruptcheck")) { int32_t tryfix = parm->numparms>=1 && !Bstrcasecmp(parm->parms[0], "tryfix"); if (parm->numparms >= 1 || tryfix) { - if (!Bstrcasecmp(parm->parms[0], "noalreadyrefd")) - { - corruptcheck_noalreadyrefd = !corruptcheck_noalreadyrefd; - OSD_Printf("%sgnore 'already referenced' corruption\n", - corruptcheck_noalreadyrefd?"I":"Don't i"); - return OSDCMD_OK; - } - else if (!Bstrcasecmp(parm->parms[0], "now")) + if (!Bstrcasecmp(parm->parms[0], "now")) { int32_t printfromlevel = 1; if (parm->numparms > 1) @@ -9416,6 +9416,7 @@ static int32_t registerosdcommands(void) OSD_RegisterFunction("testplay_addparam", "testplay_addparam \"string\": sets additional parameters for test playing", osdcmd_testplay_addparam); OSD_RegisterFunction("show_heightindicators", "show_heightindicators {0, 1 or 2}: sets display of height indicators in 2D mode", osdcmd_vars_pk); OSD_RegisterFunction("show_ambiencesounds", "show_ambiencesounds {0, 1 or 2}>: sets display of MUSICANDSFX circles in 2D mode", osdcmd_vars_pk); + OSD_RegisterFunction("corruptcheck_noalreadyrefd", "corruptcheck_noalreadyrefd: toggles ignoring of one-to-many red wall connections", osdcmd_vars_pk); OSD_RegisterFunction("corruptcheck", "corruptcheck {|now|tryfix}: sets auto corruption check interval if given, otherwise as indicated", osdcmd_vars_pk); #ifdef USE_OPENGL OSD_RegisterFunction("tint", "tint : queries or sets hightile tinting", osdcmd_tint);