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
+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;