This commit is contained in:
Daveo 2001-05-29 19:19:14 +00:00
parent 8b49a6d3a5
commit 6839a20427
2 changed files with 14 additions and 4 deletions

View file

@ -140,12 +140,10 @@ CNpcHazard::NPC_HAZARD_UNIT_TYPE CNpcHazard::mapEditConvertTable[NPC_HAZARD_TYPE
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CNpcHazard *CNpcHazard::Create(sThingHazard *ThisHazard)
CNpcHazard *CNpcHazard::Create(int Type)
{
CNpcHazard *hazard;
NPC_HAZARD_UNIT_TYPE Type = getTypeFromMapEdit( ThisHazard->Type );
hazard = (CNpcHazard*)CThingManager::GetThing(CThing::TYPE_HAZARD,Type);
if (!hazard)
switch( Type )
@ -281,6 +279,17 @@ CNpcHazard *CNpcHazard::Create(sThingHazard *ThisHazard)
hazard->setThingSubType(Type);
hazard->init();
return( hazard );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CNpcHazard *CNpcHazard::Create(sThingHazard *ThisHazard)
{
NPC_HAZARD_UNIT_TYPE Type = getTypeFromMapEdit( ThisHazard->Type );
CNpcHazard *hazard=Create(ThisHazard->Type);
hazard->setWaypoints( ThisHazard );
hazard->setGraphic( ThisHazard );

View file

@ -74,6 +74,7 @@ public:
virtual void setRespawnRate( s16 newRespawnRate ) {m_respawnRate=newRespawnRate;}
static NPC_HAZARD_UNIT_TYPE getTypeFromMapEdit( u16 newType );
static CNpcHazard *Create(int Type);
static CNpcHazard *Create(sThingHazard *ThisHazard);
void setPlatform(CThing *_newPlatform) {m_platform = _newPlatform;}