This commit is contained in:
parent
186df73da3
commit
ac3b5a5d62
@ -157,6 +157,16 @@ void CNpcStaticClamEnemy::postInit()
|
||||
|
||||
m_isStunned = false;
|
||||
m_isAnimating = false;
|
||||
|
||||
// create platform in same place
|
||||
|
||||
CNpcClamPlatform *platform = new ("clam platform") CNpcClamPlatform;
|
||||
|
||||
platform->setType( CNpcClamPlatform::NPC_CLAM_PLATFORM );
|
||||
platform->setGraphic( (u8) 0 );
|
||||
platform->init( Pos );
|
||||
platform->setTiltable( false );
|
||||
platform->setBBox();
|
||||
}
|
||||
|
||||
void CNpcStaticClamEnemy::processClose( int _frames )
|
||||
@ -175,9 +185,11 @@ void CNpcStaticClamEnemy::processClose( int _frames )
|
||||
m_frame = 0;
|
||||
m_isAnimating = false;
|
||||
}
|
||||
|
||||
m_isStunned = false;
|
||||
}
|
||||
|
||||
void CNpcStaticClamEnemy::processShot( int _frames )
|
||||
/*void CNpcStaticClamEnemy::processShot( int _frames )
|
||||
{
|
||||
if ( !m_isStunned )
|
||||
{
|
||||
@ -194,29 +206,30 @@ void CNpcStaticClamEnemy::processShot( int _frames )
|
||||
{
|
||||
m_isStunned = true;
|
||||
|
||||
// create platform in same place
|
||||
|
||||
CNpcClamPlatform *platform = new ("clam platform") CNpcClamPlatform;
|
||||
|
||||
platform->setType( CNpcClamPlatform::NPC_CLAM_PLATFORM );
|
||||
platform->setGraphic( (u8) 0 );
|
||||
platform->init( Pos );
|
||||
platform->setTiltable( false );
|
||||
platform->setBBox();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||
}
|
||||
}*/
|
||||
|
||||
void CNpcStaticClamEnemy::collidedWith( CThing *_thisThing )
|
||||
{
|
||||
if ( !m_isStunned )
|
||||
if ( m_isActive && !m_isCaught && !m_isDying )
|
||||
{
|
||||
CNpcClamEnemy::collidedWith( _thisThing );
|
||||
switch(_thisThing->getThingType())
|
||||
{
|
||||
case TYPE_PLAYER:
|
||||
{
|
||||
m_isStunned = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
//virtual int checkCollisionAgainst(CThing *_thisThing, int _frames);
|
||||
protected:
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
virtual void processShot( int _frames );
|
||||
//virtual void processShot( int _frames );
|
||||
virtual void processClose( int _frames );
|
||||
|
||||
u8 m_isStunned;
|
||||
|
@ -307,7 +307,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||
false,
|
||||
0,
|
||||
128,
|
||||
DETECT_ATTACK_COLLISION_GENERIC,
|
||||
DETECT_NO_COLLISION,
|
||||
DAMAGE__HIT_ENEMY,
|
||||
0,
|
||||
0,
|
||||
|
@ -64,7 +64,7 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
|
||||
true,
|
||||
DAMAGE__NONE,
|
||||
0,
|
||||
4,
|
||||
2,
|
||||
NPC_PLATFORM_INFINITE_LIFE_COLLAPSIBLE,
|
||||
0,
|
||||
NPC_PLATFORM_TIMER_NONE,
|
||||
|
Loading…
Reference in New Issue
Block a user