This commit is contained in:
Charles 2001-07-09 19:38:58 +00:00
parent 097c54d7cc
commit dfd36d956e
7 changed files with 72 additions and 2 deletions

View file

@ -45,6 +45,7 @@ void CNpcGaryFriend::postInit()
m_started = false;
m_fallDeath = false;
m_drawRotation = 0;
m_obstructed = false;
m_soundId = (int) NOT_PLAYING;
}
@ -216,7 +217,7 @@ void CNpcGaryFriend::think( int _frames )
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL, true );
}
if ( !conveyorOverride )
if ( !conveyorOverride && !m_obstructed )
{
Pos.vx += multiplier * 2 * _frames;
}
@ -248,7 +249,7 @@ void CNpcGaryFriend::think( int _frames )
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL, true );
}
if ( !conveyorOverride )
if ( !conveyorOverride && !m_obstructed )
{
Pos.vx += multiplier * 2 * _frames;
}
@ -261,6 +262,8 @@ void CNpcGaryFriend::think( int _frames )
}
}
}
m_obstructed = false;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View file

@ -32,6 +32,7 @@ public:
void startLeft();
void startRight();
void render();
void setObstructed() {m_obstructed = true;}
protected:
DVECTOR m_triggerPos;
@ -40,6 +41,7 @@ protected:
s16 m_speed;
s16 m_drawRotation;
int m_soundId;
u8 m_obstructed;
};
#endif

View file

@ -58,6 +58,7 @@ public:
void setPlatform( CNpcPlatform *platform ) {m_platform = platform;}
void clearPlatform() {m_platform = NULL;}
virtual void setupWaypoints( sThingActor *ThisActor );
virtual void setObstructed() {}
static CNpcFriend *Create(sThingActor *ThisActor);
static NPC_FRIEND_UNIT_TYPE getTypeFromMapEdit( u16 newType );