This commit is contained in:
parent
1ab34685db
commit
3804517959
15 changed files with 108 additions and 44 deletions
|
@ -41,8 +41,25 @@ void CNpcPricklyBugEnemy::processMovementModifier( int _frames, s32 distX, s32 d
|
|||
testPos1.vx -= 10;
|
||||
testPos2.vx += 10;
|
||||
|
||||
testPos1.vy += CGameScene::getCollision()->getHeightFromGround( testPos1.vx, testPos1.vy, 16 );
|
||||
testPos2.vy += CGameScene::getCollision()->getHeightFromGround( testPos2.vx, testPos2.vy, 16 );
|
||||
int groundDist = CGameScene::getCollision()->getHeightFromGround( testPos1.vx, testPos1.vy, 16 );
|
||||
|
||||
if ( abs( groundDist ) > 15 )
|
||||
{
|
||||
m_drawRotation = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
testPos1.vy += groundDist;
|
||||
|
||||
groundDist = CGameScene::getCollision()->getHeightFromGround( testPos2.vx, testPos2.vy, 16 );
|
||||
|
||||
if ( abs( groundDist ) > 15 )
|
||||
{
|
||||
m_drawRotation = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
testPos2.vy += groundDist;
|
||||
|
||||
s32 xDist = testPos2.vx - testPos1.vx;
|
||||
s32 yDist = testPos2.vy - testPos1.vy;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue