fix issue where pressing buttons too quickly resulted in you hitting yourself, because writing buttonPressed=true to gameworld took too long to do, being at the end of the function