Some bad maps will be blocked from now, and a bit more spread to shotgun
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4886 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+1
-1
@@ -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; };
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user