diff --git a/source/src/entity.h b/source/src/entity.h index e45dd958..5190a78e 100644 --- a/source/src/entity.h +++ b/source/src/entity.h @@ -45,7 +45,7 @@ enum { GUN_KNIFE = 0, GUN_PISTOL, GUN_RIFLE, GUN_SHOTGUN, GUN_SUBGUN, GUN_SNIPER #define reloadable_gun(g) (g != GUN_KNIFE && g != GUN_GRENADE) #define SGRAYS 21 -#define SGSPREAD 2 +#define SGSPREAD 2.5 #define EXPDAMRAD 10 struct itemstat { int add, start, max, sound; }; diff --git a/source/src/server.cpp b/source/src/server.cpp index 6f5be8aa..8e8c7bbc 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -1622,14 +1622,7 @@ void startdemoplayback(const char *newname) } int Mvolume, Marea; -float Mheight; - -float checkmapvolume () -{ - float Mheight = Marea ? (float)Mvolume/Marea : 0; - logline(ACLOG_INFO, "Map height density information for %s: H = %.2f V = %d and A = %d", smapname, Mheight, Mvolume, Marea); - return Mheight; -} +float Mheight = 0; void startgame(const char *newname, int newmode, int newtime, bool notify) { @@ -1676,7 +1669,7 @@ void startgame(const char *newname, int newmode, int newtime, bool notify) if(e.fitsmode(smode)) sents[i].spawned = sents[i].legalpickup = true; } mapbuffer.setrevision(); - checkmapvolume(); + logline(ACLOG_INFO, "Map height density information for %s: H = %.2f V = %d and A = %d", smapname, Mheight, Mvolume, Marea); } else if(isdedicated) sendservmsg("\f3server error: map not found - please start another map"); if(notify) diff --git a/source/src/serveractions.h b/source/src/serveractions.h index 691ed1c6..785fdd8c 100644 --- a/source/src/serveractions.h +++ b/source/src/serveractions.h @@ -48,11 +48,11 @@ struct mapaction : serveraction { bool notify = valid_client(caller); int maploc = MAP_NOTFOUND; - mapstats *ms = map[0] ? getservermapstats(map, false, &maploc) : NULL; - mapok = mode == GMODE_COOPEDIT || ms != NULL; + mapstats *ms = map[0] ? getservermapstats(map, true, &maploc) : NULL; // this is very redundant, since startgame gets the layout + mapok = mode == GMODE_COOPEDIT || ( ms != NULL && Mheight < 30 ); if(!mapok) { - if(notify) sendservmsg("the server does not have this map", caller); + if(notify) sendservmsg("the server does not have/support this map", caller); } else { // check, if map supports mode @@ -154,7 +154,7 @@ struct kickaction : playeraction kickaction(int cn) : playeraction(cn) { wasvalid = false; - role = roleconf('k'); + role = roleconf('K'); if(isvalid()) { wasvalid = true; @@ -223,7 +223,7 @@ struct autoteamaction : enableaction } autoteamaction(bool enable) : enableaction(enable) { - role = roleconf('a'); + role = roleconf('A'); if(isvalid()) formatstring(desc)("%s autoteam", enable ? "enable" : "disable"); } }; @@ -238,7 +238,7 @@ struct shuffleteamaction : serveraction bool isvalid() { return serveraction::isvalid() && m_teammode; } shuffleteamaction() { - role = roleconf('s'); + role = roleconf('S'); if(isvalid()) copystring(desc, "shuffle teams"); } }; diff --git a/source/src/tools.cpp b/source/src/tools.cpp index 7c5ca27c..a8b8322b 100644 --- a/source/src/tools.cpp +++ b/source/src/tools.cpp @@ -26,6 +26,7 @@ const char *numtime() extern char *maplayout; extern int maplayout_factor, Mvolume, Marea; +extern float Mheight; mapstats *loadmapstats(const char *filename, bool getlayout) { @@ -126,7 +127,8 @@ mapstats *loadmapstats(const char *filename, bool getlayout) if(fail) break; t = c; } - if(fail) DELETEA(maplayout); + if(fail) { DELETEA(maplayout); } + else Mheight = Marea ? (float)Mvolume/Marea : 0; } } delete f;