cleaning up demo mode name weirdness
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3647 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+1
-1
@@ -12,4 +12,4 @@ alias cleardemo [ callvote 10 $arg1 ]
|
||||
alias cleardemos [ callvote 10 0 ]
|
||||
alias serverdesc [ callvote 11 $arg1 ]
|
||||
alias shuffleteams [ callvote 12 ]
|
||||
alias demo [ mode -3; map $arg1 ]
|
||||
alias demo [ mode -1; map $arg1 ]
|
||||
|
||||
@@ -113,6 +113,7 @@ void filtertext(char *dst, const char *src, int whitespace, int len)
|
||||
|
||||
const char *modefullnames[] =
|
||||
{
|
||||
"demo playback",
|
||||
"team deathmatch", "coopedit", "deathmatch", "survivor",
|
||||
"team survivor", "ctf", "pistol frenzy", "bot team deathmatch", "bot deathmatch", "last swiss standing",
|
||||
"one shot, one kill", "team one shot, one kill", "bot one shot, one kill", "hunt the flag", "team keep the flag", "keep the flag"
|
||||
@@ -120,14 +121,15 @@ const char *modefullnames[] =
|
||||
|
||||
const char *modeacronymnames[] =
|
||||
{
|
||||
"DEMO",
|
||||
"TDM", "coop", "DM", "SURV", "TSURV", "CTF", "PF", "BTDM", "BDM", "LSS",
|
||||
"OSOK", "TOSOK", "BOSOK", "HTF", "TKTF", "KTF"
|
||||
};
|
||||
|
||||
const char *voteerrors[] = { "voting is currently disabled", "there is already a vote pending", "already voted", "can't vote that often", "this vote is not allowed in the current environment (singleplayer/multiplayer)", "no permission", "invalid vote" };
|
||||
|
||||
const char *fullmodestr(int n) { return (n>=0 && (size_t)n < sizeof(modefullnames)/sizeof(modefullnames[0])) ? modefullnames[n] : n==-3 ? "demoplayback" : "unknown"; }
|
||||
const char *acronymmodestr(int n) { return (n>=0 && (size_t)n < sizeof(modeacronymnames)/sizeof(modeacronymnames[0])) ? modeacronymnames[n] : n==-3 ? "DEMO" : "n/a"; }
|
||||
const char *fullmodestr(int n) { return (n>=-1 && size_t(n+1) < sizeof(modefullnames)/sizeof(modefullnames[0])) ? modefullnames[n+1] : "unknown"; }
|
||||
const char *acronymmodestr(int n) { return (n>=-1 && size_t(n+1) < sizeof(modeacronymnames)/sizeof(modeacronymnames[0])) ? modeacronymnames[n+1] : "n/a"; }
|
||||
const char *modestr(int n, bool acronyms) { return acronyms ? acronymmodestr (n) : fullmodestr(n); }
|
||||
const char *voteerrorstr(int n) { return (n>=0 && (size_t)n < sizeof(voteerrors)/sizeof(voteerrors[0])) ? voteerrors[n] : "unknown"; }
|
||||
|
||||
|
||||
@@ -130,8 +130,8 @@ enum
|
||||
#define m_teammode (gamemode==0 || gamemode==4 || gamemode==5 || gamemode==7 || gamemode==11 || gamemode==13 || gamemode==14)
|
||||
#define m_tarena (m_arena && m_teammode)
|
||||
#define m_botmode (gamemode==7 || gamemode == 8 || gamemode==12)
|
||||
#define m_valid(mode) (((mode)>=0 && (mode)<=15) || (mode) == -3)
|
||||
#define m_valid(mode) (((mode)>=0 && (mode)<=15) || (mode) == -1)
|
||||
#define m_mp(mode) (m_valid(mode) && (mode)!=7 && (mode)!=8 && (mode)!=12)
|
||||
#define m_demo (gamemode==-3)
|
||||
#define m_demo (gamemode==-1)
|
||||
#define m_flags (m_ctf || m_htf || m_ktf)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user