diff --git a/Graphics/levels/Chapter02/Level04/Level04.MEX b/Graphics/levels/Chapter02/Level04/Level04.MEX index 8fa35415b..2ac68a481 100644 Binary files a/Graphics/levels/Chapter02/Level04/Level04.MEX and b/Graphics/levels/Chapter02/Level04/Level04.MEX differ diff --git a/Graphics/levels/Chapter02/Level04/level04.Mep b/Graphics/levels/Chapter02/Level04/level04.Mep index 730647777..42dca0b4e 100644 Binary files a/Graphics/levels/Chapter02/Level04/level04.Mep and b/Graphics/levels/Chapter02/Level04/level04.Mep differ diff --git a/source/player/player.cpp b/source/player/player.cpp index aac9fbf41..0bb67a613 100644 --- a/source/player/player.cpp +++ b/source/player/player.cpp @@ -2570,7 +2570,42 @@ void CPlayer::shove( DVECTOR const &move ) int colHeight; // X movement - colHeight=CGameScene::getCollision()->getHeightFromGround(Pos.vx+move.vx,Pos.vy,5); + int xDist = move.vx; + + colHeight=0; + + while( xDist ) + { + colHeight=CGameScene::getCollision()->getHeightFromGround(Pos.vx+xDist,Pos.vy,5); + if ( colHeight < 0 ) + { + break; + } + + if ( xDist > 0 ) + { + if ( xDist >= 8 ) + { + xDist -= 8; + } + else + { + xDist = 0; + } + } + else if ( xDist < 0 ) + { + if ( xDist <= -8 ) + { + xDist += 8; + } + else + { + xDist = 0; + } + } + } + if(colHeight<0) { // Stop at the edge of the obstruction