This commit is contained in:
parent
45e993fffa
commit
2ef77639d3
6 changed files with 36 additions and 3 deletions
|
@ -485,7 +485,7 @@ void CNpcAnemone2Enemy::processClose( int _frames )
|
|||
|
||||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||
m_timerFunc = NPC_TIMER_ATTACK_DONE;
|
||||
m_timerTimer = GameState::getOneSecondInFrames();
|
||||
m_timerTimer = 4 * GameState::getOneSecondInFrames();
|
||||
m_sensorFunc = NPC_SENSOR_NONE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1455,7 +1455,17 @@ void CNpcEnemy::processEnemyCollision( CThing *thisThing )
|
|||
}
|
||||
|
||||
Pos.vx += otherDelta.vx;
|
||||
Pos.vy += otherDelta.vy;
|
||||
|
||||
s32 groundHeight = m_layerCollision->getHeightFromGround( Pos.vx, Pos.vy, 16 );
|
||||
|
||||
if ( groundHeight < 8 )
|
||||
{
|
||||
Pos.vy += groundHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
Pos.vy += otherDelta.vy;
|
||||
}
|
||||
|
||||
m_heading = headingFromTarget;
|
||||
|
||||
|
|
|
@ -165,3 +165,15 @@ void CNpcFishHookPlatform::render()
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcFishHookPlatform::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
sBBox &thinkBBox = CThingManager::getThinkBBox();
|
||||
objThinkBox.y2 = thinkBBox.YMin + 1;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
|
@ -23,6 +23,7 @@ class CNpcFishHookPlatform : public CNpcPlatform
|
|||
public:
|
||||
virtual void postInit();
|
||||
virtual void render();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void processLifetime( int _frames );
|
||||
virtual void processMovement( int _frames );
|
||||
|
|
|
@ -41,6 +41,7 @@ void CNpcJellyfishPlatform::postInit()
|
|||
|
||||
m_vertScale = 0;
|
||||
m_dipCount = 0;
|
||||
m_dipOffset = 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -119,16 +120,23 @@ void CNpcJellyfishPlatform::think( int _frames )
|
|||
{
|
||||
s16 sineVal = ( m_dipCount << 10 ) / GameState::getOneSecondInFrames();
|
||||
|
||||
Pos.vy += ( 3 * rcos( sineVal ) ) >> 12;
|
||||
m_dipOffset = ( 4 * rcos( sineVal ) ) >> 12;
|
||||
|
||||
m_dipCount += _frames;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dipOffset = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dipCount = 0;
|
||||
m_dipOffset = 0;
|
||||
}
|
||||
|
||||
Pos.vy += m_dipOffset;
|
||||
|
||||
CNpcLinearPlatform::think( _frames );
|
||||
}
|
||||
|
||||
|
@ -143,6 +151,7 @@ void CNpcJellyfishPlatform::render()
|
|||
if (canRender())
|
||||
{
|
||||
DVECTOR &renderPos=getRenderPos();
|
||||
//renderPos.vy += m_dipOffset;
|
||||
SVECTOR rotation;
|
||||
rotation.vx = 0;
|
||||
rotation.vy = 0;
|
||||
|
|
|
@ -29,6 +29,7 @@ protected:
|
|||
|
||||
s32 m_vertScale;
|
||||
u8 m_dipCount;
|
||||
s32 m_dipOffset;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Reference in a new issue