diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index 5d6e0175..08618893 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -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]; diff --git a/source/src/server.cpp b/source/src/server.cpp index 387928a4..8894c0cd 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -735,7 +735,8 @@ bool flagdistance(sflaginfo &f, int cn) v.x = f.pos[0]; v.y = f.pos[1]; break; } - if(v.x < 0) return true; + bool lagging = (c.ping < 1000 && c.spj < 100); + if(v.x < 0 && !lagging) return true; float dist = c.state.o.dist(v); int pdist = check_pdist(&c,dist); if(pdist) @@ -745,7 +746,7 @@ bool flagdistance(sflaginfo &f, int cn) c.hostname, c.name, (pdist==2?"tried to touch":"touched"), team_string(&f == sflaginfos + 1), dist, c.farpickups); if (pdist==2) return false; } - return true; + return lagging ? false : true; // today I found a lag hacker :: Brahma, 19-oct-2010... lets test it a bit } void sendflaginfo(int flag = -1, int cn = -1)