Bad lights - Why?

I have built a 3D-Engine with Lightsources and I have a Problem: If I’m walking around, the lightsource follows me!!

GLfloat LightAmbient[]= { 0.7f, 0.7f, 0.7f, 0.2f };
GLfloat LightDiffuse[]= { 0.5f, 1.0f, 1.0f, 1.0f };
GLfloat LightPosition[]= { 0.0f, 0.0f, 3.0f, 1.0f };

glLightfv(GL_LIGHT1, GL_AMBIENT, LightAmbient);
glLightfv(GL_LIGHT1, GL_DIFFUSE, LightDiffuse);
glLightfv(GL_LIGHT1, GL_POSITION,LightPosition);

The position of the lightsource is transformed through the ModelView matrix stack. So if you want the lights to be fixed in the world, set up your light positions after your camera rotation.

Thank you.
And how can I set the range of the lightsource?

You can’t. You have to turn it off manually when the object get too far away.

That’s not entirely correct. You can set attenuation factors for lights. This won’t prevent the lighting calculations from taking place in the event that the light is beyond the range of being useful in the scene, so it is to your benifit to turn off negligible lights.