This commit is contained in:
Charles 2001-02-28 17:34:45 +00:00
parent 59808450d6
commit c26bed0f30
3 changed files with 11 additions and 8 deletions

View File

@ -206,16 +206,17 @@ void CNpcEnemy::init()
{
CEnemyThing::init();
sActorHdr *Hdr=m_skel.Load(ACTORS_SPONGEBOB_A3D);
sActorHdr *Hdr=m_skel.Load(ACTORS_CLAM_A3D);
m_skel.Init(Hdr);
TPLoadTex(ACTORS_ACTOR_SPONGEBOB_TEX);
m_skel.setAnimDatabase(CAnimDB::Load(ACTORS_SPONGEBOB_ABK));
TPLoadTex(ACTORS_ACTOR_ENEMY_TEX);
m_skel.setAnimDatabase(CAnimDB::Load(ACTORS_CLAM_ABK));
m_skel.setAng(1024);
// temporary
m_animNo = 0;
m_frame = 0;
m_type = NPC_CIRCULAR_PLATFORM;
m_type = NPC_CLAM;
m_heading = m_fireHeading = 0;
m_movementTimer = 0;
@ -1126,9 +1127,10 @@ void CNpcEnemy::render()
DVECTOR renderPos;
DVECTOR offset = CLevel::getCameraPos();
renderPos.vx = ( Pos.vx - offset.vx ) * 20;
renderPos.vy = ( Pos.vy - offset.vy ) * 20;
renderPos.vx = ( Pos.vx - offset.vx - ( VidGetScrW() >> 1 ) ) * 20;
renderPos.vy = ( Pos.vy - offset.vy - ( VidGetScrH() >> 1 ) ) * 20;
m_skel.setZAng( m_heading );
m_skel.setPos( renderPos );
m_skel.setFrame(m_frame);
m_skel.setAnimNo(m_animNo);

View File

@ -256,6 +256,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
NPC_MOVEMENT_MODIFIER_NONE,
NPC_CLOSE_CLAM_ATTACK,
NPC_TIMER_NONE,
false,
0,
128,
false,

View File

@ -100,8 +100,8 @@ void CGameScene::init()
Level.init();
#ifdef __USER_charles__
CNpcFriend *enemy;
enemy=new ("test enemy") CNpcFriend;
CNpcEnemy *enemy;
enemy=new ("test enemy") CNpcEnemy;
enemy->init();
enemy->setLayerCollision( Level.getCollisionLayer() );
#endif