25% of double nades, mouse filter tool (thanks to Franz) and ripping the easy access to kick/ban menu

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5023 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-05-23 21:40:44 +00:00
parent f575a50797
commit d50f37b4ea
5 changed files with 15 additions and 3 deletions
+3 -1
View File
@@ -646,6 +646,7 @@ void checkinput()
{
SDL_Event event;
int lasttype = 0, lastbut = 0;
int tdx=0,tdy=0;
while(events.length() || SDL_PollEvent(&event))
{
if(events.length()) event = events.remove(0);
@@ -684,7 +685,7 @@ void checkinput()
int dx = event.motion.xrel, dy = event.motion.yrel;
checkmousemotion(dx, dy);
resetmousemotion();
mousemove(dx, dy);
tdx+=dx;tdy+=dy;
}
break;
@@ -697,6 +698,7 @@ void checkinput()
break;
}
}
mousemove(tdx, tdy);
}
VARF(gamespeed, 10, 100, 1000, if(multiplayer()) gamespeed = 100);
+8
View File
@@ -754,12 +754,20 @@ FVARP(sensitivityscale, 1e-3f, 1, 1000);
VARP(invmouse, 0, 0, 1);
FVARP(mouseaccel, 0, 0, 1000);
FVARP(mfilter, 0.0f, 0.0f, 3.0f);
float fdx = 0, fdy = 0;
void mousemove(int dx, int dy)
{
if(intermission) return;
if(player1->isspectating() && player1->spectatemode==SM_FOLLOW1ST) return;
float cursens = sensitivity;
if (mfilter>0.0) {
float mousefilter=mfilter/curtime*14;
fdx = dx = ( fdx * mousefilter + dx )/( mousefilter + 1 );
fdy = dy = ( fdy * mousefilter + dy )/( mousefilter + 1 );
}
if(mouseaccel && curtime && (dx || dy)) cursens += mouseaccel * sqrtf(dx*dx + dy*dy)/curtime;
cursens /= 33.0f*sensitivityscale;
camera1->yaw += dx*cursens;
+1 -1
View File
@@ -1293,7 +1293,7 @@ void checkitemspawns(int diff)
sents[i].spawntime = 0;
sents[i].spawned = true;
sendf(-1, 1, "ri2", SV_ITEMSPAWN, i);
if (m_lss && sents[i].type == I_GRENADE && rnd(101) > 70 ) {
if (m_lss && sents[i].type == I_GRENADE && rnd(101) > 75 ) {
sents[i].twice = true;
sendf(-1, 1, "ri2", SV_ITEMSPAWN, i);
}