From 1202341e9bc553666b293a239c450df4cafb80e1 Mon Sep 17 00:00:00 2001 From: flowtron Date: Mon, 2 Aug 2010 19:31:28 +0000 Subject: [PATCH] physics tweaks git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5523 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/physics.cpp | 6 +++--- source/src/weapon.cpp | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/source/src/physics.cpp b/source/src/physics.cpp index a3f9c2e6..61dad459 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -268,7 +268,7 @@ bool collide(physent *d, bool spawn, float drop, float rise) } VARP(maxroll, 0, 0, 20); // note: when changing max value, fix network transmission -VAR(recoilbackfade, 0, 100, 1000); +//VAR(recoilbackfade, 0, 100, 1000); void resizephysent(physent *pl, int moveres, int curtime, float min, float max) { @@ -585,12 +585,12 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime) pl->pitch += pl->pitchvel*(curtime/1000.0f)*pl->maxspeed*(pl->crouching ? 0.75f : 1.0f); pl->pitchvel *= fric-3; pl->pitchvel /= fric; - extern int recoiltest; + /*extern int recoiltest; if(recoiltest) { if(pl->pitchvel < 0.05f && pl->pitchvel > 0.001f) pl->pitchvel -= recoilbackfade/100.0f; // slide back } - else if(pl->pitchvel < 0.05f && pl->pitchvel > 0.001f) pl->pitchvel -= ((playerent *)pl)->weaponsel->info.recoilbackfade/100.0f; // slide back + else*/ if(pl->pitchvel < 0.05f && pl->pitchvel > 0.001f) pl->pitchvel -= ((playerent *)pl)->weaponsel->info.recoilbackfade/100.0f; // slide back if(pl->pitchvel) fixcamerarange(pl); // fix pitch if necessary } diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 0c2c989f..83b5bfc8 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -629,12 +629,11 @@ void weapon::renderstats() } } -VAR(recoiltest, 0, 0, 1); // DISABLE ON RELEASE -//int recoiltest = 0; -VAR(recoilincrease, 1, 2, 10); -VAR(recoilbase, 0, 40, 1000); -VAR(maxrecoil, 0, 1000, 1000); +static int recoiltest = 0;//VAR(recoiltest, 0, 0, 1); // DISABLE ON RELEASE +static int recoilincrease = 2; //VAR(recoilincrease, 1, 2, 10); +static int recoilbase = 40;//VAR(recoilbase, 0, 40, 1000); +static int maxrecoil = 1000;//VAR(maxrecoil, 0, 1000, 1000); void weapon::attackphysics(vec &from, vec &to) // physical fx to the owner {