This commit is contained in:
parent
f69756d998
commit
0de9037e49
2 changed files with 19 additions and 0 deletions
|
@ -21,6 +21,9 @@
|
|||
|
||||
#include "game\game.h"
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcMasherHazard::init()
|
||||
{
|
||||
CNpcHazard::init();
|
||||
|
@ -28,6 +31,8 @@ void CNpcMasherHazard::init()
|
|||
m_state = MASHER_DROPPING;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcMasherHazard::processMovement( int _frames )
|
||||
{
|
||||
switch ( m_state )
|
||||
|
@ -82,3 +87,16 @@ void CNpcMasherHazard::processMovement( int _frames )
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcMasherHazard::setGraphic( sThingHazard *ThisHazard )
|
||||
{
|
||||
m_modelGfx = new ("ModelGfx") CModelGfx;
|
||||
m_modelGfx->SetModel( ThisHazard->Gfx );
|
||||
|
||||
sBBox boundingBox = m_modelGfx->GetBBox();
|
||||
boundingBox.YMin = boundingBox.YMax - 18;
|
||||
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
|
||||
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( boundingBox.YMax + boundingBox.YMin ) >> 1 );
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ class CNpcMasherHazard : public CNpcHazard
|
|||
{
|
||||
public:
|
||||
void init();
|
||||
virtual void setGraphic( sThingHazard *ThisHazard );
|
||||
protected:
|
||||
void processMovement( int _frames );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue