This commit is contained in:
Charles 2001-04-05 14:17:24 +00:00
parent 7aa1ed3944
commit b08c0884df
4 changed files with 7 additions and 18 deletions

View File

@ -190,7 +190,7 @@ void CNpcEnemy::processCloseAnemone2Attack( int _frames )
DVECTOR spikePos;
heading = m_heading - 1024 + ( fireLoop * 512 );
heading %= 4096;
heading &= 4095;
spikePos = Pos;
spikePos.vx += ( 10 * rcos( heading ) ) >> 12;

View File

@ -62,7 +62,7 @@ void CNpcEnemy::processGenericGotoTarget( int _frames, s32 xDist, s32 yDist, s32
}
m_heading += moveDist;
m_heading = m_heading % ONE;
m_heading &= 4095;
s32 preShiftX = _frames * speed * rcos( m_heading );
s32 preShiftY = _frames * speed * rsin( m_heading );
@ -146,8 +146,9 @@ bool CNpcEnemy::processGroundCollisionReverse( s32 *moveX, s32 *moveY )
*moveY = -(*moveY);
m_heading += 2048;
m_heading &= 4096;
}
m_heading &= 4095;
}
return( xBlocked | yBlocked );
@ -203,7 +204,7 @@ void CNpcEnemy::processGenericFixedPathMove( int _frames, s32 *moveX, s32 *moveY
}
m_heading += *moveDist;
m_heading = m_heading % ONE;
m_heading &= 4095;
s32 preShiftX = _frames * m_data[m_type].speed * rcos( m_heading );
s32 preShiftY = _frames * m_data[m_type].speed * rsin( m_heading );

View File

@ -386,18 +386,6 @@ void CNpcEnemy::postInit()
case NPC_INIT_RETURNING_HAZARD:
{
DVECTOR newPos;
newPos.vx = 100;
newPos.vy = 10;
m_npcPath.addWaypoint( newPos );
newPos.vx = 500;
newPos.vy = 10;
m_npcPath.addWaypoint( newPos );
m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH );
break;
@ -452,7 +440,7 @@ void CNpcEnemy::postInit()
DVECTOR spikePos;
heading = m_heading - 1024 + ( fireLoop * 512 );
heading %= 4096;
heading &= 4095;
spikePos = Pos;
spikePos.vx += ( 10 * rcos( heading ) ) >> 12;

View File

@ -146,7 +146,7 @@ void CNpcEnemy::processCloseSmallJellyfishEvade( int _frames )
headingToPlayer -= 1024;
}
headingToPlayer %= ONE;
headingToPlayer &= 4095;
s16 decDir, incDir;