This commit is contained in:
parent
45e993fffa
commit
2ef77639d3
6 changed files with 36 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue