From: Clyne Sullivan Date: Thu, 29 Oct 2015 12:19:07 +0000 (-0400) Subject: fixed world again X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=cb2ebd8ec104afb617485c8caa07c1b572d27aea;p=clyne%2Fgamedev.git fixed world again --- diff --git a/src/ui.cpp b/src/ui.cpp index e6d18d2..e5a2f44 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -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; }