Don't allow a negative ball speed
This commit is contained in:
parent
919436f997
commit
aa59033d28
@ -817,7 +817,8 @@ void keyboard(unsigned char key, int x, int y)
|
||||
glutPostRedisplay();
|
||||
break;
|
||||
case 'K':
|
||||
ball_speed -= 0.2f;
|
||||
if (ball_speed - 0.2f > 0)
|
||||
ball_speed -= 0.2f;
|
||||
glutPostRedisplay();
|
||||
break;
|
||||
case 'f':
|
||||
|
Loading…
Reference in New Issue
Block a user