The code has been remade and re-posted (see comment right before yours)
You still have this
if(m_pos.y != 0); // Should be if(m_pos.y <= 0);
Though you're only adding or subtracting '0.5', in an actual game/project time is a factor and '0.00001 != 0.0', just a heads up. It will only work in your case.
I had to stop myself from writing a tutorial