Added check for inverted mouse setting in movement code