avoiding lag-speedhack in flag pick up, fixes into showmapstats functions

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5776 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-10-19 23:14:58 +00:00
parent 8c24608ca6
commit f95c2a3e28
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -252,17 +252,17 @@ bool good_map() // call this function only at startmap
{
if (mlayout) MA = checkarea(sfactor, mlayout);
F2F = 1000 * MINFF;
if(m_flags)
{
flaginfo &f0 = flaginfos[0];
flaginfo &f1 = flaginfos[1];
#define DIST(x) (f0.pos.x - f1.pos.x)
F2F = (!numflagspawn[0] || !numflagspawn[1]) ? 1000 * MINFF : (int) fSqrt(DIST(x)*DIST(x)+DIST(y)*DIST(y));
F2F = (!numflagspawn[0] || !numflagspawn[1]) ? 1000 * MINFF : DIST(x)*DIST(x)+DIST(y)*DIST(y);
#undef DIST
}
item_fail = false;
loopv(ents)
{
entity &e1 = ents[i];