This commit is contained in:
parent
dda6189111
commit
58b8952233
2 changed files with 24 additions and 0 deletions
|
@ -244,6 +244,18 @@ void CNpcGhostTrainPlatform::processMovement( int _frames )
|
|||
|
||||
setCollisionAngle( heading );
|
||||
|
||||
testPos2 = Pos;
|
||||
testPos2.vx += 32;
|
||||
|
||||
yDiff = CGameScene::getCollision()->getHeightFromGroundCart( testPos2.vx, testPos2.vy, sensorDist + 1 );
|
||||
|
||||
if ( yDiff <= sensorDist )
|
||||
{
|
||||
// only use if there is ground present
|
||||
|
||||
testPos2.vy += yDiff;
|
||||
}
|
||||
|
||||
switch ( CGameScene::getCollision()->getCollisionBlock( testPos2.vx, testPos2.vy - 8 ) & COLLISION_TYPE_MASK )
|
||||
{
|
||||
case COLLISION_TYPE_FLAG_DAMAGE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue