fixed issue #223 about disabling shadows/ground textures

TBH , i didn't quite analyze the impact of this change , but i read the function , and i think this shouldn't affect anything else in a bad way , i am kinda surprised it was that simple :D