This commit is contained in:
Paul 2001-03-29 19:29:06 +00:00
parent 11d17c56bb
commit 88577baa66

View file

@ -996,25 +996,6 @@ void CPlayer::setPlatform( CThing *newPlatform )
---------------------------------------------------------------------- */ ---------------------------------------------------------------------- */
void CPlayer::shove( DVECTOR move ) void CPlayer::shove( DVECTOR move )
{ {
DVECTOR newPos;
newPos.vx = Pos.vx + move.vx;
newPos.vy = Pos.vy + move.vy;
int colHeight = m_layerCollision->getHeightFromGround( newPos.vx, newPos.vy, 1 );
if( colHeight < 0 )
{
// target position in within wall, abort
return;
}
else
{
Pos.vx = newPos.vx;
Pos.vy = newPos.vy;
}
/*
int colHeight; int colHeight;
// X movement // X movement
@ -1082,7 +1063,6 @@ void CPlayer::shove( DVECTOR move )
// No obstruction // No obstruction
Pos.vy+=move.vy; Pos.vy+=move.vy;
} }
*/
} }
void CPlayer::setPlatform(CThing *_newPlatform) void CPlayer::setPlatform(CThing *_newPlatform)