From 10188222c4c46257939cdc4579dacaa962575bac Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 4 May 2001 19:26:04 +0000 Subject: [PATCH] --- source/platform/platform.cpp | 3 +++ source/platform/praft.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/source/platform/platform.cpp b/source/platform/platform.cpp index 53f1aed76..887acb316 100644 --- a/source/platform/platform.cpp +++ b/source/platform/platform.cpp @@ -426,6 +426,9 @@ void CNpcPlatform::reinit() 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 ); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/platform/praft.cpp b/source/platform/praft.cpp index 04ef7b04d..a524d838f 100644 --- a/source/platform/praft.cpp +++ b/source/platform/praft.cpp @@ -31,6 +31,10 @@ void CNpcRaftPlatform::postInit() m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH ); 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 ); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////