This commit is contained in:
parent
097c54d7cc
commit
dfd36d956e
7 changed files with 72 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -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
|
|
@ -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 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue