This commit is contained in:
parent
2668b7ca7a
commit
fc84e1f409
3 changed files with 14 additions and 3 deletions
|
@ -49,7 +49,7 @@ void CNpcEnemyGenerator::think(int _frames)
|
|||
|
||||
CNpcEnemy *enemy;
|
||||
enemy=CNpcEnemy::Create( CNpcEnemy::NPC_SPIDER_CRAB );
|
||||
enemy->setStartPos( ( Pos.vx - 8 ) >> 4, ( Pos.vy - 16 ) >> 4 );
|
||||
enemy->setStartPosHighRes( Pos.vx, Pos.vy - 8 );
|
||||
|
||||
u16 *waypointPtr = m_npcPath.getWaypointPtr();
|
||||
|
||||
|
|
|
@ -568,6 +568,16 @@ void CNpcEnemy::setStartPos( s32 xPos, s32 yPos )
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcEnemy::setStartPosHighRes( s32 xPos, s32 yPos )
|
||||
{
|
||||
Pos.vx = xPos;
|
||||
Pos.vy = yPos;
|
||||
|
||||
m_initPos = m_base = Pos;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcEnemy::setHeading( s32 xPos, s32 yPos )
|
||||
{
|
||||
m_heading = ( ratan2( ( ( yPos << 4 ) + 16 ) - Pos.vy, ( ( xPos << 4 ) + 8 ) - Pos.vx ) ) & 4095;
|
||||
|
|
|
@ -110,6 +110,7 @@ public:
|
|||
void setWaypointCount( u8 newCount ) {m_npcPath.setWaypointCount( newCount );}
|
||||
void setPathType( u8 newType ) {m_npcPath.setPathType( newType );}
|
||||
void setStartPos( s32 xPos, s32 yPos );
|
||||
void setStartPosHighRes( s32 xPos, s32 yPos );
|
||||
virtual u8 hasBeenAttacked();
|
||||
virtual void hasBeenSteamed( DVECTOR &steamPos ) {hasBeenAttacked();}
|
||||
virtual u8 canBeCaughtByNet();
|
||||
|
|
Loading…
Add table
Reference in a new issue