From ac6b455592af49c9e6603a80f8fb2991ad61a3f3 Mon Sep 17 00:00:00 2001 From: Jason Hooks Date: Sun, 17 Jun 2012 12:57:59 -0400 Subject: [PATCH] StepSize moved back to 9 --- libs/openengine/bullet/pmove.cpp | 8 +++++--- libs/openengine/bullet/pmove.h | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/libs/openengine/bullet/pmove.cpp b/libs/openengine/bullet/pmove.cpp index b6876e43fb..6173acacfc 100644 --- a/libs/openengine/bullet/pmove.cpp +++ b/libs/openengine/bullet/pmove.cpp @@ -530,7 +530,7 @@ int PM_StepSlideMove( bool gravity ) delta = pm->ps.origin.z - start_o.z; if ( delta > 2 ) { - pm->ps.counter = 10; + pm->ps.counter = 5; /* if (gravity) @@ -1167,8 +1167,7 @@ void PM_GroundTraceMissed() //We should not have significant upwards velocity when in the air, unless we jumped. //This code protects against flying into the air when moving at high speeds. //Z velocity is set to 50, instead of 0, to help move up certain steps. - if(pm->ps.velocity.z > 50.0f) - pm->ps.velocity.z = 50.0f; + //std::cout << "Ground trace missed\n"; // we just transitioned into freefall //if ( pm->debugLevel ) @@ -1431,10 +1430,13 @@ static void PM_GroundTrace( void ) // if the trace didn't hit anything, we are in free fall if ( trace.fraction == 1.0) { + if(pm->ps.velocity.z > 50.0f && pm->ps.bSnap) + pm->ps.velocity.z = 50.0f; if(pm->ps.snappingImplemented){ if(pm->ps.bSnap && pm->ps.counter <= 0) PM_GroundTraceMissed(); } + return; diff --git a/libs/openengine/bullet/pmove.h b/libs/openengine/bullet/pmove.h index d838f17f5b..bc475a9340 100644 --- a/libs/openengine/bullet/pmove.h +++ b/libs/openengine/bullet/pmove.h @@ -28,7 +28,7 @@ static const Ogre::Vector3 halfExtents(14.64f * 2, 14.24f * 2, 33.25f * 2); #define MAX_CLIP_PLANES 5 #define OVERCLIP 1.001f //#define STEPSIZE 18 // 18 is way too much -#define STEPSIZE (13.5) +#define STEPSIZE (9) #ifndef M_PI #define M_PI 3.14159265358979323846f #endif @@ -42,7 +42,7 @@ static const Ogre::Vector3 halfExtents(14.64f * 2, 14.24f * 2, 33.25f * 2); #define ENTITYNUM_NONE (MAX_GENTITIES - 1) #define ENTITYNUM_WORLD (MAX_GENTITIES - 2) #define MIN_WALK_NORMAL .7f // can't walk on very steep slopes -#define JUMP_VELOCITY (270) +#define JUMP_VELOCITY (540) #define PS_PMOVEFRAMECOUNTBITS 6 #define MINS_Z -24 #define DEFAULT_VIEWHEIGHT 26 @@ -90,7 +90,7 @@ struct playerMove { struct playerStruct { - playerStruct() : gravity(800.0f), speed(480.0f), pmove_framecount(20), groundEntityNum(ENTITYNUM_NONE), commandTime(40), move_type(PM_NOCLIP), pm_time(0), snappingImplemented(true), bSnap(false), counter(-1) + playerStruct() : gravity(800.0f), speed(2000.0f), pmove_framecount(20), groundEntityNum(ENTITYNUM_NONE), commandTime(40), move_type(PM_NOCLIP), pm_time(0), snappingImplemented(true), bSnap(false), counter(-1) { origin = Ogre::Vector3(733.164f,900.0f, 839.432f); velocity = Ogre::Vector3(0.0f, 0.0f, 0.0f);