This commit is contained in:
Charles 2001-05-09 19:44:03 +00:00
parent 66630be642
commit 16ab2f330a
4 changed files with 5 additions and 4 deletions

View File

@ -185,6 +185,7 @@ void CNpcDualPlatform::processMovement( int _frames )
slaveMove.vy = -extensionChange;
m_otherPlatform->setMovement( slaveMove );
m_otherPlatform->think(_frames);
m_otherPlatform->updateCollisionArea();
}
}

View File

@ -477,7 +477,7 @@ void CNpcPlatform::reinit()
void CNpcPlatform::postInit()
{
sBBox boundingBox = m_modelGfx->GetBBox();
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), 50 + ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, boundingBox.YMin );
if ( m_type == NPC_LINEAR_PLATFORM )
@ -698,7 +698,7 @@ void CNpcPlatform::calculateBoundingBoxSize()
x2=+halfLength*mcos(angle&4095)>>12;
y2=+halfLength*msin(angle&4095)>>12;
setCollisionSize(abs(x2-x1),abs(y2-y1)+PLATFORMCOLLISIONHEIGHT);
setCollisionSize(abs(x2-x1),50 + abs(y2-y1)+PLATFORMCOLLISIONHEIGHT);
//sBBox boundingBox = m_modelGfx->GetBBox();
//setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );

View File

@ -36,7 +36,7 @@ void CNpcRaftPlatform::postInit()
m_isSinking = false;
sBBox boundingBox = m_modelGfx->GetBBox();
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), 50 + ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( ( boundingBox.YMax + boundingBox.YMin ) >> 1 ) - 16 );
}

View File

@ -35,7 +35,7 @@ void CNpcSteerableBarrelPlatform::postInit()
CNpcPlatform::postInit();
sBBox boundingBox = m_modelGfx->GetBBox();
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), 50 + ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( ( boundingBox.YMax + boundingBox.YMin ) >> 1 ) - 32 );
}