This commit is contained in:
parent
91ae454d7f
commit
183d5a3f2b
@ -135,6 +135,7 @@ void CNpcGaryFriend::think( int _frames )
|
||||
s32 fallSpeed = 3;
|
||||
s8 yMovement = fallSpeed * _frames;
|
||||
s8 groundHeight;
|
||||
u8 conveyorOverride = false;
|
||||
|
||||
// check vertical collision
|
||||
|
||||
@ -156,6 +157,22 @@ void CNpcGaryFriend::think( int _frames )
|
||||
break;
|
||||
}
|
||||
|
||||
case COLLISION_TYPE_FLAG_MOVE_LEFT:
|
||||
{
|
||||
conveyorOverride = true;
|
||||
Pos.vx--;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case COLLISION_TYPE_FLAG_MOVE_RIGHT:
|
||||
{
|
||||
conveyorOverride = true;
|
||||
Pos.vx++;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -199,7 +216,10 @@ void CNpcGaryFriend::think( int _frames )
|
||||
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_soundId == NOT_PLAYING )
|
||||
{
|
||||
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL, true );
|
||||
}
|
||||
if ( m_soundId == NOT_PLAYING )
|
||||
{
|
||||
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_GARY_DE_SNAIL, true );
|
||||
}
|
||||
|
||||
Pos.vx += multiplier * 2 * _frames;
|
||||
if ( !conveyorOverride )
|
||||
{
|
||||
Pos.vx += multiplier * 2 * _frames;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user