This commit is contained in:
parent
f04edb8544
commit
c616369ec5
7 changed files with 123 additions and 34 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue