Explorar o código

Map key press up to thrusters

SimplyMinimal %!s(int64=3) %!d(string=hai) anos
pai
achega
6c8444e490
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app.c

+ 1 - 1
app.c

@@ -514,7 +514,7 @@ void game_tick(void* ctx) {
     /* Handle keypresses. */
     /* Handle keypresses. */
     if(app->pressed[InputKeyLeft]) app->ship.rot -= .35;
     if(app->pressed[InputKeyLeft]) app->ship.rot -= .35;
     if(app->pressed[InputKeyRight]) app->ship.rot += .35;
     if(app->pressed[InputKeyRight]) app->ship.rot += .35;
-    if(key_pressed_time(app, InputKeyOk) > 70) {
+    if(app->pressed[InputKeyUp]) {
         app->ship.vx -= 0.5 * (float)sin(app->ship.rot);
         app->ship.vx -= 0.5 * (float)sin(app->ship.rot);
         app->ship.vy += 0.5 * (float)cos(app->ship.rot);
         app->ship.vy += 0.5 * (float)cos(app->ship.rot);
     } else if(app->pressed[InputKeyDown]) {
     } else if(app->pressed[InputKeyDown]) {