This commit is contained in:
parent
3b945b9a17
commit
e9e595535a
1 changed files with 6 additions and 10 deletions
|
@ -929,18 +929,14 @@ int CPlayer::getHeightFromGround(int _x,int _y,int _maxHeight)
|
|||
CThing *platform;
|
||||
|
||||
height=height=m_layerCollision->getHeightFromGround(_x,_y,_maxHeight);
|
||||
|
||||
if(height<_maxHeight)
|
||||
{
|
||||
platform=isOnPlatform();
|
||||
if(platform)
|
||||
{
|
||||
int platformHeight;
|
||||
platformHeight=((CNpcPlatform*)platform)->getHeightFromPlatformAtPosition(_x,_y);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue