Don't run up walls

actorid
Jason Hooks 13 years ago
parent fb4e7f02b9
commit d081f7ea83

@ -301,6 +301,12 @@ bool PM_SlideMove( bool gravity )
if ( into >= 0.1 )
continue; // move doesn't interact with the plane
std::cout << "Second plane" << planes[i] << "\n";
if(planes[i].x >= .70)
{
pm->ps.velocity = Ogre::Vector3(0,0,0);
return true;
}
// see how hard we are hitting things
if ( -into > pml.impactSpeed )
pml.impactSpeed = -into;
@ -321,6 +327,13 @@ bool PM_SlideMove( bool gravity )
if (clipVelocity.dotProduct(planes[j]) >= 0.1)
//if ( DotProduct( clipVelocity, planes[j] ) >= 0.1 )
continue; // move doesn't interact with the plane
//pm->ps.velocity = Ogre::Vector3(0,0,0);
//return true;
// try clipping the move to the plane
PM_ClipVelocity( clipVelocity, planes[j], clipVelocity, OVERCLIP );
@ -330,8 +343,8 @@ bool PM_SlideMove( bool gravity )
if (clipVelocity.dotProduct(planes[i]) >= 0)
//if ( DotProduct( clipVelocity, planes[i] ) >= 0 )
continue;
// slide the original velocity along the crease
//dProduct (planes[i], planes[j], dir);
dir = planes[i].crossProduct(planes[j]) ;

@ -90,7 +90,7 @@ struct playerMove
{
struct playerStruct
{
playerStruct() : gravity(800.0f), speed(500.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);

Loading…
Cancel
Save