This commit is contained in:
parent
62347a748a
commit
bfbd5700f7
7 changed files with 95 additions and 4 deletions
|
@ -260,6 +260,34 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
|
|||
NPC_PLATFORM_TIMER_NONE,
|
||||
},
|
||||
|
||||
{ // NPC_OILDRUM_GENERATOR
|
||||
ACTORS_CLAM_SBK,
|
||||
ANIM_CLAM_SIDESNAP,
|
||||
2,
|
||||
128,
|
||||
true,
|
||||
DAMAGE__NONE,
|
||||
0,
|
||||
4,
|
||||
NPC_PLATFORM_INFINITE_LIFE,
|
||||
4,
|
||||
NPC_PLATFORM_TIMER_NONE,
|
||||
},
|
||||
|
||||
{ // NPC_CRATE_GENERATOR
|
||||
ACTORS_CLAM_SBK,
|
||||
ANIM_CLAM_SIDESNAP,
|
||||
3,
|
||||
128,
|
||||
true,
|
||||
DAMAGE__NONE,
|
||||
0,
|
||||
4,
|
||||
NPC_PLATFORM_INFINITE_LIFE,
|
||||
4,
|
||||
NPC_PLATFORM_TIMER_NONE,
|
||||
},
|
||||
|
||||
{ // NPC_PLAYER_BUBBLE_PLATFORM
|
||||
ACTORS_CLAM_SBK,
|
||||
ANIM_CLAM_SIDESNAP,
|
||||
|
@ -294,5 +322,7 @@ CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATF
|
|||
NPC_CRATE_PLATFORM,
|
||||
NPC_BOUNCE_PLATFORM,
|
||||
NPC_DUAL_PLATFORM,
|
||||
NPC_OILDRUM_GENERATOR,
|
||||
NPC_CRATE_GENERATOR,
|
||||
NPC_PLAYER_BUBBLE_PLATFORM,
|
||||
};
|
||||
|
|
|
@ -107,6 +107,10 @@
|
|||
#include "platform\pplayer.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PLATFORM_PFGEN_H__
|
||||
#include "platform\pfgen.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -227,6 +231,24 @@ CNpcPlatform *CNpcPlatform::Create(sThingPlatform *ThisPlatform)
|
|||
break;
|
||||
}
|
||||
|
||||
case NPC_OILDRUM_GENERATOR:
|
||||
{
|
||||
CNpcFallingPlatformGenerator *generator;
|
||||
generator = new ("oildrum generator") CNpcFallingPlatformGenerator;
|
||||
generator->setTargetType( NPC_OILDRUM_PLATFORM );
|
||||
platform = generator;
|
||||
break;
|
||||
}
|
||||
|
||||
case NPC_CRATE_GENERATOR:
|
||||
{
|
||||
CNpcFallingPlatformGenerator *generator;
|
||||
generator = new ("crate generator") CNpcFallingPlatformGenerator;
|
||||
generator->setTargetType( NPC_CRATE_PLATFORM );
|
||||
platform = generator;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
ASSERT( 0 );
|
||||
|
@ -287,14 +309,16 @@ void CNpcPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
|
||||
void CNpcPlatform::setGraphic( sThingPlatform *ThisPlatform )
|
||||
{
|
||||
m_graphicNum = ThisPlatform->Gfx;
|
||||
m_modelGfx = new ("ModelGfx") CModelGfx;
|
||||
m_modelGfx->SetModel( ThisPlatform->Gfx );
|
||||
m_modelGfx->SetModel( m_graphicNum );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcPlatform::setGraphic( u8 graphicNum )
|
||||
{
|
||||
m_graphicNum = graphicNum;
|
||||
m_modelGfx = new ("ModelGfx") CModelGfx;
|
||||
m_modelGfx->SetModel( graphicNum );
|
||||
}
|
||||
|
@ -1101,6 +1125,13 @@ void CNpcPlatform::setTypeFromMapEdit( u16 newType )
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcPlatform::setLayerCollision( class CLayerCollision *_layer )
|
||||
{
|
||||
m_layerCollision=_layer;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::getTypeFromMapEdit( u16 newType )
|
||||
{
|
||||
return( mapEditConvertTable[newType] );
|
||||
|
|
|
@ -69,6 +69,8 @@ public:
|
|||
NPC_CRATE_PLATFORM,
|
||||
NPC_BOUNCE_PLATFORM,
|
||||
NPC_DUAL_PLATFORM,
|
||||
NPC_OILDRUM_GENERATOR,
|
||||
NPC_CRATE_GENERATOR,
|
||||
NPC_PLAYER_BUBBLE_PLATFORM,
|
||||
NPC_PLATFORM_TYPE_MAX,
|
||||
};
|
||||
|
@ -78,9 +80,9 @@ public:
|
|||
void init( DVECTOR initPos, s32 initLifetime );
|
||||
virtual void postInit();
|
||||
void shutdown();
|
||||
void think(int _frames);
|
||||
virtual void think(int _frames);
|
||||
virtual void render();
|
||||
void setLayerCollision( class CLayerCollision *_layer ) {m_layerCollision=_layer;}
|
||||
void setLayerCollision( class CLayerCollision *_layer );
|
||||
void setType( NPC_PLATFORM_UNIT_TYPE newType ) {m_type = newType;}
|
||||
void setTypeFromMapEdit( u16 newType );
|
||||
#ifdef REMOVETHIS
|
||||
|
@ -202,6 +204,8 @@ protected:
|
|||
|
||||
u8 m_platformWidth;
|
||||
|
||||
int m_graphicNum;
|
||||
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
|
||||
static NPC_PLATFORM_UNIT_TYPE mapEditConvertTable[NPC_PLATFORM_TYPE_MAX];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue