This commit is contained in:
parent
280650f5f7
commit
10188222c4
2 changed files with 7 additions and 0 deletions
|
@ -426,6 +426,9 @@ void CNpcPlatform::reinit()
|
||||||
|
|
||||||
void CNpcPlatform::postInit()
|
void CNpcPlatform::postInit()
|
||||||
{
|
{
|
||||||
|
sBBox boundingBox = m_modelGfx->GetBBox();
|
||||||
|
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
|
||||||
|
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( boundingBox.YMax + boundingBox.YMin ) >> 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -31,6 +31,10 @@ void CNpcRaftPlatform::postInit()
|
||||||
m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH );
|
m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH );
|
||||||
|
|
||||||
m_isActivated = false;
|
m_isActivated = false;
|
||||||
|
|
||||||
|
sBBox boundingBox = m_modelGfx->GetBBox();
|
||||||
|
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
|
||||||
|
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( ( boundingBox.YMax + boundingBox.YMin ) >> 1 ) - 16 );
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue