This commit is contained in:
Charles 2001-07-02 22:57:31 +00:00
parent 91ae454d7f
commit 183d5a3f2b

View File

@ -135,6 +135,7 @@ void CNpcGaryFriend::think( int _frames )
s32 fallSpeed = 3; s32 fallSpeed = 3;
s8 yMovement = fallSpeed * _frames; s8 yMovement = fallSpeed * _frames;
s8 groundHeight; s8 groundHeight;
u8 conveyorOverride = false;
// check vertical collision // check vertical collision
@ -156,6 +157,22 @@ void CNpcGaryFriend::think( int _frames )
break; break;
} }
case COLLISION_TYPE_FLAG_MOVE_LEFT:
{
conveyorOverride = true;
Pos.vx--;
break;
}
case COLLISION_TYPE_FLAG_MOVE_RIGHT:
{
conveyorOverride = true;
Pos.vx++;
break;
}
default: default:
break; break;
} }
@ -199,7 +216,10 @@ void CNpcGaryFriend::think( int _frames )
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL, true ); m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL, true );
} }
Pos.vx += multiplier * 2 * _frames; if ( !conveyorOverride )
{
Pos.vx += multiplier * 2 * _frames;
}
} }
} }
} }
@ -223,12 +243,15 @@ void CNpcGaryFriend::think( int _frames )
{ {
if ( m_started ) if ( m_started )
{ {
if ( m_soundId == NOT_PLAYING ) if ( m_soundId == NOT_PLAYING )
{ {
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL, true ); m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL, true );
} }
Pos.vx += multiplier * 2 * _frames; if ( !conveyorOverride )
{
Pos.vx += multiplier * 2 * _frames;
}
} }
} }
} }