]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
fixed world again
authorClyne Sullivan <tullivan99@gmail.com>
Thu, 29 Oct 2015 12:19:07 +0000 (08:19 -0400)
committerClyne Sullivan <tullivan99@gmail.com>
Thu, 29 Oct 2015 12:19:07 +0000 (08:19 -0400)
src/ui.cpp

index e6d18d2d3125678b850ee432b80397830c5130d8..e5a2f44982ee3b6b7c72969086085c79779296a2 100644 (file)
@@ -238,11 +238,17 @@ namespace ui {
                                        }
                                }
                                if(SDL_KEY==SDLK_i){
-                                       player->vel.y=.5;
+                                       player->vel.y=.2;
+                                       player->loc.y+=HLINE*7;
                                        player->ground=false;
                                        currentWorld=currentWorld->goWorldBack(player); // Go back a layer if possible  
                                }
-                               if(SDL_KEY==SDLK_k)currentWorld=currentWorld->goWorldFront(player);     // Go forward a layer if possible
+                               if(SDL_KEY==SDLK_k){
+                                       player->vel.y=.2;
+                                       player->loc.y+=HLINE*10;
+                                       player->ground=false;
+                                       currentWorld=currentWorld->goWorldFront(player);        // Go forward a layer if possible
+                               }
                                if(SDL_KEY==SDLK_LSHIFT)player->speed = 3;                                                      // Sprint
                                if(SDL_KEY==SDLK_LCTRL)player->speed = .5;
                        }