This commit is contained in:
Paul 2001-04-30 23:02:50 +00:00
parent 3b945b9a17
commit e9e595535a

View file

@ -929,18 +929,14 @@ int CPlayer::getHeightFromGround(int _x,int _y,int _maxHeight)
CThing *platform; CThing *platform;
height=height=m_layerCollision->getHeightFromGround(_x,_y,_maxHeight); height=height=m_layerCollision->getHeightFromGround(_x,_y,_maxHeight);
if(height<_maxHeight)
platform=isOnPlatform();
if(platform)
{ {
int platformHeight; platform=isOnPlatform();
platformHeight=((CNpcPlatform*)platform)->getHeightFromPlatformAtPosition(_x,_y); if(platform)
if(platformHeight>_maxHeight)platformHeight=_maxHeight;
else if(platformHeight<-_maxHeight)platformHeight=-_maxHeight;
if(height>platformHeight)
{ {
height=platformHeight; height=((CNpcPlatform*)platform)->getHeightFromPlatformAtPosition(_x,_y);
if(height>_maxHeight)height=_maxHeight;
else if(height<-_maxHeight)height=-_maxHeight;
} }
} }