showmapstats and mapstats_hud commands (client side map quality information), putting scopesens alias back to defaults, commenting spectating logs info, and updating docs

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5775 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-10-19 21:21:17 +00:00
parent a4066c0237
commit 8c24608ca6
6 changed files with 83 additions and 7 deletions
+16
View File
@@ -927,6 +927,21 @@ void resetmap(bool mrproper)
int suicided = -1;
extern bool good_map();
extern bool item_fail;
extern int MA, F2F;
extern float Mh;
VARP(mapstats_hud, 0, 0, 1);
void showmapstats()
{
conoutf("\f2Map Quality Stats");
conoutf(" The mean height is: %.2f", Mh);
if (MA) conoutf(" The max area is: %d", MA);
if (m_flags && F2F < 1000) conoutf(" Flag-to-flag distance is: %d", F2F);
if (item_fail) conoutf(" There are one or more items too close to each other in this map");
}
COMMAND(showmapstats, ARG_NONE);
void startmap(const char *name, bool reset) // called just after a map load
{
@@ -944,6 +959,7 @@ void startmap(const char *name, bool reset) // called just after a map load
if(m_valid(gamemode) && !m_mp(gamemode)) respawnself();
else findplayerstart(player1);
if(good_map()==MAP_IS_BAD) conoutf(_("You cannot play in this map due to quality requisites. Please, report this incident."));
if (mapstats_hud) showmapstats();
if(!reset) return;