This commit is contained in:
parent
1e6bd15130
commit
f8e54e2202
3 changed files with 9 additions and 9 deletions
|
@ -39,7 +39,6 @@ void CNpcBranchPlatform::postInit()
|
||||||
CNpcPlatform::postInit();
|
CNpcPlatform::postInit();
|
||||||
|
|
||||||
m_angularVelocity = 0;
|
m_angularVelocity = 0;
|
||||||
m_platformWidth <<= 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -665,18 +665,21 @@ void CNpcPlatform::calculateBoundingBoxSize()
|
||||||
|
|
||||||
angle=getCollisionAngle();
|
angle=getCollisionAngle();
|
||||||
centre=getCollisionCentre();
|
centre=getCollisionCentre();
|
||||||
halfLength=m_platformWidth/2;
|
|
||||||
|
|
||||||
/*x1=-halfLength*mcos(angle&4095)>>12;
|
//halfLength=m_platformWidth/2;
|
||||||
|
sBBox boundingBox = m_modelGfx->GetBBox();
|
||||||
|
halfLength = ( boundingBox.XMax - boundingBox.XMin ) >> 1;
|
||||||
|
|
||||||
|
x1=-halfLength*mcos(angle&4095)>>12;
|
||||||
y1=-halfLength*msin(angle&4095)>>12;
|
y1=-halfLength*msin(angle&4095)>>12;
|
||||||
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),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 ) );
|
||||||
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( boundingBox.YMax + boundingBox.YMin ) >> 1 );
|
//setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( boundingBox.YMax + boundingBox.YMin ) >> 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -205,8 +205,6 @@ protected:
|
||||||
CModelGfx *m_modelGfx;
|
CModelGfx *m_modelGfx;
|
||||||
u8 m_isShuttingDown;
|
u8 m_isShuttingDown;
|
||||||
|
|
||||||
u8 m_platformWidth;
|
|
||||||
|
|
||||||
int m_graphicNum;
|
int m_graphicNum;
|
||||||
|
|
||||||
virtual void collidedWith(CThing *_thisThing);
|
virtual void collidedWith(CThing *_thisThing);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue