mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 09:23:53 +00:00
Don't run up walls
This commit is contained in:
parent
fb4e7f02b9
commit
d081f7ea83
2 changed files with 15 additions and 2 deletions
|
@ -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;
|
||||
|
@ -322,6 +328,13 @@ bool PM_SlideMove( bool gravity )
|
|||
//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 );
|
||||
PM_ClipVelocity( endClipVelocity, planes[j], endClipVelocity, OVERCLIP );
|
||||
|
|
|
@ -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…
Reference in a new issue