game mode description line
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2702 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -169,3 +169,10 @@ exec config/menus_bot.cfg
|
||||
exec config/menus_edit.cfg
|
||||
exec config/menus_settings.cfg
|
||||
exec config/menus_multiplayer.cfg
|
||||
|
||||
// game mode descriptions
|
||||
gamemodedesc 5 [CTF: Steal the enemy flag and bring it to your home base. Don't let your own flag get stolen.]
|
||||
gamemodedesc 13 [HTF: Find the enemy flag, frag the flag bearer and collect the flag to score. Protect your own team flag.]
|
||||
gamemodedesc 14 [TKTF: There is only one flag. Get the flag and keep it. You score one point every 15 seconds. If your teammate has the flag, protect him.]
|
||||
gamemodedesc 15 [KTF: Get the flag and keep it. You score one point every 15 seconds. You are alone. Everybody else will try to frag you.]
|
||||
|
||||
|
||||
@@ -624,6 +624,19 @@ void preparectf(bool cleanonly=false)
|
||||
}
|
||||
}
|
||||
|
||||
struct gmdesc { int mode; char *desc; };
|
||||
vector<gmdesc> gmdescs;
|
||||
|
||||
void gamemodedesc(char *modenr, char *desc)
|
||||
{
|
||||
if(!modenr || !desc) return;
|
||||
struct gmdesc &gd = gmdescs.add();
|
||||
gd.mode = atoi(modenr);
|
||||
gd.desc = newstring(desc);
|
||||
}
|
||||
|
||||
COMMAND(gamemodedesc, ARG_2STR);
|
||||
|
||||
int suicided = -1;
|
||||
|
||||
void startmap(const char *name) // called just after a map load
|
||||
@@ -657,6 +670,7 @@ void startmap(const char *name) // called just after a map load
|
||||
minutesremaining = -1;
|
||||
bool noflags = (m_ctf || m_ktf) && (!numflagspawn[0] || !numflagspawn[1]);
|
||||
if(*clientmap) conoutf("game mode is \"%s\"%s", modestr(gamemode, modeacronyms > 0), noflags ? " - \f2but there are no flag bases on this map" : "");
|
||||
loopv(gmdescs) if(gmdescs[i].mode == gamemode) conoutf(gmdescs[i].desc);
|
||||
|
||||
// run once
|
||||
if(firstrun)
|
||||
|
||||
Reference in New Issue
Block a user