minor changes & comments
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5243 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -26,9 +26,10 @@ VARP(autogetmap, 0, 1, 1); // only if the client doesn't have that map
|
||||
VARP(autogetnewmaprevisions, 0, 1, 1);
|
||||
|
||||
bool localwrongmap = false;
|
||||
|
||||
int MA = 0; // flowtron: moved here
|
||||
bool changemapserv(char *name, int mode, int download, int revision) // forced map change from the server
|
||||
{
|
||||
MA = 0; // reset for checkarea()
|
||||
gamemode = mode;
|
||||
if(m_demo) return true;
|
||||
if(m_coop)
|
||||
@@ -219,14 +220,14 @@ void parsepositions(ucharbuf &p)
|
||||
|
||||
extern int checkarea(int maplayout_factor, char *maplayout);
|
||||
char *mlayout = NULL;
|
||||
int Mv = 0, Ma = 0, MA = 0;
|
||||
int Mv = 0, Ma = 0; // moved up:, MA = 0;
|
||||
float Mh = 0;
|
||||
extern int connected;
|
||||
|
||||
bool good_map()
|
||||
{
|
||||
bool checked = ((MA = checkarea(sfactor, mlayout)) < MAXMAREA && Mh < MAXMHEIGHT);
|
||||
if (!connected || gamemode == GMODE_COOPEDIT) return true;
|
||||
bool checked = (MA==0) ? ((MA = checkarea(sfactor, mlayout)) < MAXMAREA && Mh < MAXMHEIGHT) : true;
|
||||
return checked;
|
||||
}
|
||||
|
||||
@@ -271,7 +272,7 @@ void showhudextras(char hudextras, char value){
|
||||
if (!p || p == player1) teamworkid = -1;
|
||||
else outf("\f4you replied to %s",p->name);
|
||||
}
|
||||
else outf("\f3Update your client, NOOB!");
|
||||
else outf("\f3Update your client!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ void kick_abuser(int cn, int &cmillis, int &count, int limit)
|
||||
|
||||
bool mapisok(mapstats *ms)
|
||||
{
|
||||
/* Check if flags are ok */
|
||||
if ( ms->hasflags ) {
|
||||
if ( ms->hasflags ) // Check if flags are ok
|
||||
{
|
||||
struct { short x, y; } fl[2];
|
||||
loopi(2)
|
||||
{
|
||||
@@ -50,7 +50,6 @@ bool mapisok(mapstats *ms)
|
||||
FlagFlag = pow2(fl[0].x - fl[1].x) + pow2(fl[0].y - fl[1].y);
|
||||
}
|
||||
else FlagFlag = MINFF * 1000; // the map has no flags
|
||||
|
||||
return Mheight < MAXMHEIGHT && (Mopen = checkarea(testlayout_factor, testlayout)) < MAXMAREA && FlagFlag > MINFF;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ inline float pow2(float x)
|
||||
|
||||
//FIXME
|
||||
/* There are smarter ways to implement this function */
|
||||
// flowtron: 2010jun27 : mapdims[6] is probably "good enough" - so this might be deprecated - mapdims would need a server-side implementation though.
|
||||
int getmaxarea(int inversed_x, int inversed_y, int transposed, int maplayout_factor, char *maplayout)
|
||||
{
|
||||
int ls = (1 << maplayout_factor);
|
||||
@@ -433,7 +434,7 @@ void checkfrag (client *target, client *actor, int gun, bool gib)
|
||||
else addpt(actor, TKPT);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int next_afk_check = 200;
|
||||
|
||||
Reference in New Issue
Block a user