From c26bed0f301f79b7c187cf4850dacf4252640448 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 28 Feb 2001 17:34:45 +0000 Subject: [PATCH] --- source/enemy/npc.cpp | 14 ++++++++------ source/enemy/npcdata.cpp | 1 + source/game/game.cpp | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/source/enemy/npc.cpp b/source/enemy/npc.cpp index 9855e173b..1140e557e 100644 --- a/source/enemy/npc.cpp +++ b/source/enemy/npc.cpp @@ -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); diff --git a/source/enemy/npcdata.cpp b/source/enemy/npcdata.cpp index 0bfd78d61..eb7e07cc3 100644 --- a/source/enemy/npcdata.cpp +++ b/source/enemy/npcdata.cpp @@ -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, diff --git a/source/game/game.cpp b/source/game/game.cpp index a9874d39f..51f873de7 100644 --- a/source/game/game.cpp +++ b/source/game/game.cpp @@ -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