From: Clyne Sullivan Date: Sat, 22 Oct 2016 22:51:45 +0000 (-0400) Subject: merge fixes X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=b32c68a5a4bfb06f321a1d78357c65458b24e760;p=clyne%2Fgamedev.git merge fixes --- b32c68a5a4bfb06f321a1d78357c65458b24e760 diff --cc src/player.cpp index fcbff1c,95a9c08..82de470 --- a/src/player.cpp +++ b/src/player.cpp @@@ -62,7 -62,7 +62,8 @@@ void PlayerSystem::receive(const KeyUpE void PlayerSystem::receive(const KeyDownEvent &kde) { auto kc = kde.keycode; + auto& loc = *game::entities.get(pid).component().get(); + auto& faceLeft = game::entities.get(pid).component().get()->faceLeft; /*auto worldSwitch = [&](const WorldSwitchInfo& wsi){ player->canMove = false; @@@ -99,18 -99,30 +100,18 @@@ }*/ } else if (kc == getControl(1)) { if (!ui::fadeEnable) { - moveLeft = true; + moveLeft = faceLeft = true; moveRight = false; - /*if (currentWorldToLeft) { - std::thread([&](void){ - auto thing = currentWorld->goWorldLeft(p); - if (thing.first != currentWorld) - worldSwitch(thing); - }).detach(); - }*/ + game::engine.getSystem()->goWorldLeft(loc); } } else if (kc == getControl(2)) { if (!ui::fadeEnable) { - moveLeft = false; + moveLeft = faceLeft = false; moveRight = true; - /*if (currentWorldToRight) { - std::thread([&](void){ - auto thing = currentWorld->goWorldRight(p); - if (thing.first != currentWorld) - worldSwitch(thing); - }).detach(); - }*/ - } + game::engine.getSystem()->goWorldRight(loc); + } } else if (kc == getControl(3)) { if (game::canSprint) speed = 2.0f;