This commit is contained in:
Charles 2001-06-11 23:12:58 +00:00
parent f04edb8544
commit c616369ec5
7 changed files with 123 additions and 34 deletions

View file

@ -728,18 +728,29 @@ if(newmode!=-1)
platform=isOnPlatform();
if(platform)
{
DVECTOR posDelta;
posDelta=platform->getPosDelta();
posDelta.vy = 0;
shove(posDelta);
int platformOffset = ( ( CNpcPlatform* ) platform )->getHeightFromPlatformAtPosition( Pos.vx, Pos.vy );
int height=CGameScene::getCollision()->getHeightFromGround(Pos.vx,Pos.vy,16);
if ( platformOffset < height )
if ( ( (CNpcPlatform *) platform )->isCart() )
{
Pos.vx = platform->getPos().vx;
Pos.vy = platform->getPos().vy;
int platformOffset = ( ( CNpcPlatform* ) platform )->getHeightFromPlatformAtPosition( Pos.vx, Pos.vy );
Pos.vy += platformOffset;
}
else
{
DVECTOR posDelta;
posDelta=platform->getPosDelta();
posDelta.vy = 0;
shove(posDelta);
int platformOffset = ( ( CNpcPlatform* ) platform )->getHeightFromPlatformAtPosition( Pos.vx, Pos.vy );
int height=CGameScene::getCollision()->getHeightFromGround(Pos.vx,Pos.vy,16);
if ( platformOffset < height )
{
Pos.vy += platformOffset;
}
}
}