mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-11 07:41:36 +00:00
gametype command now prints gametype NAMES instead of numbers. Even prints "Single player" when appropriate!
git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@8997 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd
This commit is contained in:
parent
0dff0d84de
commit
9b0e09877e
1 changed files with 21 additions and 1 deletions
|
@ -3193,7 +3193,27 @@ static void Command_ModDetails_f(void)
|
||||||
//
|
//
|
||||||
static void Command_ShowGametype_f(void)
|
static void Command_ShowGametype_f(void)
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("Current gametype is %d\n"), gametype);
|
INT32 j;
|
||||||
|
const char *gametypestr = NULL;
|
||||||
|
|
||||||
|
if (!(netgame || multiplayer)) // print "Single player" instead of "Co-op"
|
||||||
|
{
|
||||||
|
CONS_Printf(M_GetText("Current gametype is %s\n"), M_GetText("Single player"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// find name string for current gametype
|
||||||
|
for (j = 0; gametype_cons_t[j].strvalue; j++)
|
||||||
|
{
|
||||||
|
if (gametype_cons_t[j].value == gametype)
|
||||||
|
{
|
||||||
|
gametypestr = gametype_cons_t[j].strvalue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (gametypestr)
|
||||||
|
CONS_Printf(M_GetText("Current gametype is %s\n"), gametypestr);
|
||||||
|
else // string for current gametype was not found above (should never happen)
|
||||||
|
CONS_Printf(M_GetText("Unknown gametype set (%d)\n"), gametype);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Plays the intro.
|
/** Plays the intro.
|
||||||
|
|
Loading…
Reference in a new issue