The cause is this part:
if (vel.X > 0)
{
player.spritePos.X += vel.X * (float)gameTime.ElapsedGameTime.TotalSeconds;
vel.X -= acc.X * (float)gameTime.ElapsedGameTime.TotalSeconds;
}
if (vel.X < 0)
{
player.spritePos.X += vel.X * (float)gameTime.ElapsedGameTime.TotalSeconds;
vel.X += acc.X * (float)gameTime.ElapsedGameTime.TotalSeconds;
}
If I rewrite it using the value of acc.X you provided and I am going to guess gameTime.ElapsedGameTime.TotalSeconds is 1/30 and XNA is running at 30 updates a second:
if (vel.X > 0)
{
vel.X -= 150 * (float)1/30;
}
if (vel.X < 0)
{
vel.X += 150 * (float)1/30;
}
Which is:
if (vel.X > 0)
{
vel.X -= 5;
}
if (vel.X < 0)
{
vel.X += 5;
}
So if vel.X is 2.5, it will reduce it to -2.5 Then next update it's -2.5 so it increases it to 2.5, and it keeps switching between the two but it never gets to 0.
To fix it you could try this:
if (vel.X > 0)
{
player.spritePos.X += vel.X * (float)gameTime.ElapsedGameTime.TotalSeconds;
vel.X -= acc.X * (float)gameTime.ElapsedGameTime.TotalSeconds;
if (vel.X < 0)
vel.X = 0;
}
if (vel.X < 0)
{
player.spritePos.X += vel.X * (float)gameTime.ElapsedGameTime.TotalSeconds;
vel.X += acc.X * (float)gameTime.ElapsedGameTime.TotalSeconds;
if (vel.X > 0)
vel.X = 0;
}