This commit is contained in:
parent
dcc063f721
commit
6ff72ee055
2 changed files with 8 additions and 3 deletions
|
@ -511,10 +511,12 @@ int CPlayer::getHeightFromGround(int _x,int _y,int _maxHeight)
|
|||
if(isOnPlatform())
|
||||
{
|
||||
DVECTOR platformPos;
|
||||
platformPos=m_platform->getPos();
|
||||
platformPos=m_platform->getPosDelta();
|
||||
DVECTOR newPos = getNewCollidedPos();
|
||||
|
||||
height = newPos.vy - Pos.vy;
|
||||
// since collision was detected in the LAST frame, we must check to see where the platform has moved to in THIS frame
|
||||
|
||||
height = newPos.vy + platformPos.vy - Pos.vy;
|
||||
|
||||
// if(height<-_maxHeight)
|
||||
// {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue