This commit is contained in:
parent
66630be642
commit
16ab2f330a
4 changed files with 5 additions and 4 deletions
|
@ -185,6 +185,7 @@ void CNpcDualPlatform::processMovement( int _frames )
|
||||||
slaveMove.vy = -extensionChange;
|
slaveMove.vy = -extensionChange;
|
||||||
|
|
||||||
m_otherPlatform->setMovement( slaveMove );
|
m_otherPlatform->setMovement( slaveMove );
|
||||||
|
m_otherPlatform->think(_frames);
|
||||||
m_otherPlatform->updateCollisionArea();
|
m_otherPlatform->updateCollisionArea();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -477,7 +477,7 @@ void CNpcPlatform::reinit()
|
||||||
void CNpcPlatform::postInit()
|
void CNpcPlatform::postInit()
|
||||||
{
|
{
|
||||||
sBBox boundingBox = m_modelGfx->GetBBox();
|
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 );
|
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, boundingBox.YMin );
|
||||||
|
|
||||||
if ( m_type == NPC_LINEAR_PLATFORM )
|
if ( m_type == NPC_LINEAR_PLATFORM )
|
||||||
|
@ -698,7 +698,7 @@ void CNpcPlatform::calculateBoundingBoxSize()
|
||||||
x2=+halfLength*mcos(angle&4095)>>12;
|
x2=+halfLength*mcos(angle&4095)>>12;
|
||||||
y2=+halfLength*msin(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();
|
//sBBox boundingBox = m_modelGfx->GetBBox();
|
||||||
//setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
|
//setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
|
||||||
|
|
|
@ -36,7 +36,7 @@ void CNpcRaftPlatform::postInit()
|
||||||
m_isSinking = false;
|
m_isSinking = false;
|
||||||
|
|
||||||
sBBox boundingBox = m_modelGfx->GetBBox();
|
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 );
|
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( ( boundingBox.YMax + boundingBox.YMin ) >> 1 ) - 16 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ void CNpcSteerableBarrelPlatform::postInit()
|
||||||
CNpcPlatform::postInit();
|
CNpcPlatform::postInit();
|
||||||
|
|
||||||
sBBox boundingBox = m_modelGfx->GetBBox();
|
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 );
|
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( ( boundingBox.YMax + boundingBox.YMin ) >> 1 ) - 32 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue