mouseaccel rescale, afk fix (again!)

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5300 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-07-07 17:24:52 +00:00
parent 46faa3ce76
commit 207cdad9f9
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -636,7 +636,7 @@ void dodamage(int damage, playerent *pl, playerent *actor, bool gib, bool local)
pl->respawnoffset = pl->lastpain = lastmillis;
// playerent *h = local ? player1 : updatefollowplayer(0);
if(/*actor==h && pl!=actor*/ actor == player1) // FIXME
if(/*actor==h && pl!=actor*/ actor == player1 && pl!=actor ) // FIXME
{
if(hitsound && lasthit != lastmillis) audiomgr.playsound(S_HITSOUND, SP_HIGH);
lasthit = lastmillis;
+1 -1
View File
@@ -777,7 +777,7 @@ void mousemove(int odx, int ody)
float cursens = sensitivity;
if(mouseaccel && curtime && (dx || dy)) cursens += mouseaccel * sqrtf(dx*dx + dy*dy)/curtime;
if(mouseaccel && curtime && (dx || dy)) cursens += 0.02 * mouseaccel * sqrtf(dx*dx + dy*dy)/curtime;
cursens /= 33.0f*sensitivityscale;
if( zooming(player1) )
+2 -2
View File
@@ -1604,7 +1604,7 @@ bool balanceteams(int ftr) // pro vs noobs never more
int h = 0, l = 1;
if ( tscore[1] > tscore[0] ) { h = 1; l = 0; }
if ( 2 * tscore[h] < 3 * tscore[l] ) return true;
if ( 2 * tscore[h] < 3 * tscore[l] || tscore[l] + tscore[l] < totalclients * 100 ) return true;
if ( tscore[h] > 3 * tscore[l] && tscore[h] > 50 * totalclients )
{
// sendf(-1, 1, "ri2", SV_SERVERMODE, sendservermode(false) | AT_SHUFFLE);
@@ -3516,7 +3516,7 @@ void serverslice(uint timeout) // main server update, called from cube main lo
if(m_arena) arenacheck();
// if(m_lms) lmscheck();
sendextras();
if ( next_afk_check > servmillis && mastermode == MM_OPEN && gamemillis > 20 * 1000 ) check_afk();
if ( mastermode == MM_OPEN && next_afk_check < servmillis && gamemillis > 20 * 1000 ) check_afk();
}
if(curvote)
+1 -1
View File
@@ -446,7 +446,7 @@ void check_afk()
{
client &c = *clients[i];
if ( c.type != ST_TCPIP || c.connectmillis + 60 * 1000 > servmillis ||
c.inputmillis + 45 * 1000 > servmillis || clienthasflag(c.clientnum) ) continue;
c.inputmillis + 45 * 1000 > servmillis || clienthasflag(c.clientnum) != -1 ) continue;
if ( ( c.state.state == CS_DEAD && !m_arena && c.state.lastdeath + 45 * 1000 < gamemillis) ||
( c.state.state == CS_ALIVE && c.upspawnp ) ||
( c.state.state == CS_SPECTATE ) ) {