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;
|
CThing *platform;
|
||||||
|
|
||||||
height=height=m_layerCollision->getHeightFromGround(_x,_y,_maxHeight);
|
height=height=m_layerCollision->getHeightFromGround(_x,_y,_maxHeight);
|
||||||
|
if(height<_maxHeight)
|
||||||
|
{
|
||||||
platform=isOnPlatform();
|
platform=isOnPlatform();
|
||||||
if(platform)
|
if(platform)
|
||||||
{
|
{
|
||||||
int platformHeight;
|
height=((CNpcPlatform*)platform)->getHeightFromPlatformAtPosition(_x,_y);
|
||||||
platformHeight=((CNpcPlatform*)platform)->getHeightFromPlatformAtPosition(_x,_y);
|
if(height>_maxHeight)height=_maxHeight;
|
||||||
if(platformHeight>_maxHeight)platformHeight=_maxHeight;
|
else if(height<-_maxHeight)height=-_maxHeight;
|
||||||
else if(platformHeight<-_maxHeight)platformHeight=-_maxHeight;
|
|
||||||
|
|
||||||
if(height>platformHeight)
|
|
||||||
{
|
|
||||||
height=platformHeight;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue