Fix errors in src/ that cppcheck yielded with the default configuration

This fixes a number of cppcheck errors that were found in the /src subfolder of supertuxkart.
I don't understand why the (float) is necessary here - 2.0f is a (single precision) float already.