This commit is contained in:
Daveo 2001-05-25 20:03:00 +00:00
parent a17ebb002a
commit f815a60cb9
2 changed files with 16 additions and 4 deletions

View File

@ -208,12 +208,10 @@ CNpcEnemy::NPC_UNIT_TYPE CNpcEnemy::getTypeFromMapEdit( u16 newType )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CNpcEnemy *CNpcEnemy::Create(sThingActor *ThisActor)
CNpcEnemy *CNpcEnemy::Create(int enemyType)
{
CNpcEnemy *enemy;
NPC_UNIT_TYPE enemyType = CNpcEnemy::getTypeFromMapEdit( ThisActor->Type );
enemy = (CNpcEnemy*)CThingManager::GetThing(TYPE_ENEMY,enemyType);
if (!enemy)
switch( enemyType )
@ -471,7 +469,7 @@ CNpcEnemy *CNpcEnemy::Create(sThingActor *ThisActor)
ASSERT(enemy);
enemy->setType( enemyType );
enemy->setType( (NPC_UNIT_TYPE)enemyType );
enemy->setThingSubType(enemyType);
enemy->init();
@ -479,6 +477,19 @@ CNpcEnemy *CNpcEnemy::Create(sThingActor *ThisActor)
return(enemy);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CNpcEnemy *CNpcEnemy::Create(sThingActor *ThisActor)
{
CNpcEnemy *enemy;
NPC_UNIT_TYPE enemyType = CNpcEnemy::getTypeFromMapEdit( ThisActor->Type );
enemy = (CNpcEnemy*)Create(enemyType);
ASSERT(enemy);
return(enemy);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcEnemy::setupWaypoints( sThingActor *ThisActor )

View File

@ -115,6 +115,7 @@ public:
void setSpeed( s16 newSpeed ) {m_speed = newSpeed;}
virtual u32 getRGB() {return( m_RGB );}
static CNpcEnemy *Create(int enemyType);
static CNpcEnemy *Create(sThingActor *ThisActor);
virtual void setupWaypoints( sThingActor *ThisActor );