diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index 611fff53..d5b2958b 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -473,7 +473,7 @@ void AiL::HandleUserInput(float fElapsedTime){ float moveAmt="Player.MoveSpd"_F; if(Input::UsingGamepad()&&KEY_SCROLLHORZ_L.Analog()>=0.2f){ float controllerAmt=abs(KEY_SCROLLHORZ_L.Analog()); - if(controllerAmt>=0.8f)controllerAmt=1.f; //Edge zone. + if(controllerAmt>=0.6f)controllerAmt=1.f; //Edge zone. if(controllerAmt>animationSpd){ animationSpd=controllerAmt; } @@ -500,11 +500,12 @@ void AiL::HandleUserInput(float fElapsedTime){ float moveAmt="Player.MoveSpd"_F; if(Input::UsingGamepad()&&KEY_SCROLLHORZ_L.Analog()<=-0.2f){ float controllerAmt=abs(KEY_SCROLLHORZ_L.Analog()); - if(controllerAmt>=0.8f)controllerAmt=1.f; //Edge zone. + controllerAmt+=0.2f; + if(controllerAmt>=0.6f)controllerAmt=1.f; //Edge zone. if(controllerAmt>animationSpd){ animationSpd=controllerAmt; } - moveAmt*=abs(KEY_SCROLLHORZ_L.Analog()); + moveAmt*=controllerAmt; }else animationSpd=1.f; player->SetX(player->GetX()-fElapsedTime*moveAmt*player->GetMoveSpdMult()); player->movementVelocity.x=-moveAmt*fElapsedTime*player->GetMoveSpdMult(); @@ -526,11 +527,12 @@ void AiL::HandleUserInput(float fElapsedTime){ float moveAmt="Player.MoveSpd"_F; if(Input::UsingGamepad()&&KEY_SCROLLVERT_L.Analog()<=-0.2f){ float controllerAmt=abs(KEY_SCROLLVERT_L.Analog()); - if(controllerAmt>=0.8f)controllerAmt=1.f; //Edge zone. + controllerAmt+=0.2f; + if(controllerAmt>=0.6f)controllerAmt=1.f; //Edge zone. if(controllerAmt>animationSpd){ animationSpd=controllerAmt; } - moveAmt*=abs(KEY_SCROLLVERT_L.Analog()); + moveAmt*=controllerAmt; }else animationSpd=1.f; player->SetY(player->GetY()-fElapsedTime*moveAmt*player->GetMoveSpdMult()); player->movementVelocity.y=-moveAmt*fElapsedTime*player->GetMoveSpdMult(); @@ -544,11 +546,12 @@ void AiL::HandleUserInput(float fElapsedTime){ float moveAmt="Player.MoveSpd"_F; if(Input::UsingGamepad()&&KEY_SCROLLVERT_L.Analog()>=0.2f){ float controllerAmt=abs(KEY_SCROLLVERT_L.Analog()); - if(controllerAmt>=0.8f)controllerAmt=1.f; //Edge zone. + controllerAmt+=0.2f; + if(controllerAmt>=0.6f)controllerAmt=1.f; //Edge zone. if(controllerAmt>animationSpd){ animationSpd=controllerAmt; } - moveAmt*=abs(KEY_SCROLLVERT_L.Analog()); + moveAmt*=controllerAmt; }else animationSpd=1.f; player->SetY(player->GetY()+fElapsedTime*moveAmt*player->GetMoveSpdMult()); player->movementVelocity.y=moveAmt*fElapsedTime*player->GetMoveSpdMult(); diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index f3b1875e..67037cc8 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -1452,9 +1452,9 @@ const vf2d Player::GetAimingLocation(bool useWalkDir,bool invert){ } } if(closestPoint!=vf2d{std::numeric_limits::max(),std::numeric_limits::max()}){ - geom2d::lineaimingLine=geom2d::line(GetPos(),closestPoint); - vf2d aimingPoint=aimingLine.rpoint((invert?-1.f:1.f)*operator""_Pixels("Player.Aiming Cursor Max Distance"_F)); - return game->GetScreenSize()/2+aimingPoint-GetPos(); + //geom2d::lineaimingLine=geom2d::line(GetPos(),closestPoint); + //vf2d aimingPoint=aimingLine.rpoint((invert?-1.f:1.f)*operator""_Pixels("Player.Aiming Cursor Max Distance"_F)); + return game->GetScreenSize()/2+closestPoint-GetPos(); }else return game->GetScreenSize()/2+vf2d{float(operator""_Pixels("Player.Aiming Cursor Max Distance"_F)),aimingAngle.y}.cart(); } diff --git a/Adventures in Lestoria/ShermanWindow.cpp b/Adventures in Lestoria/ShermanWindow.cpp index f7425b78..48117038 100644 --- a/Adventures in Lestoria/ShermanWindow.cpp +++ b/Adventures in Lestoria/ShermanWindow.cpp @@ -41,6 +41,7 @@ All rights reserved. #include "GameState.h" #include "AdventuresInLestoria.h" #include "Unlock.h" +#include "MenuLabel.h" INCLUDE_game @@ -48,7 +49,9 @@ void Menu::InitializeShermanWindow(){ Menu*shermanWindow=CreateMenu(SHERMAN,CENTERED,vi2d{144,88}); shermanWindow->ADD("Leave Button",MenuComponent)(geom2d::rect{{0.f,4.f},{144.f,24.f}},"Leave",[](MenuFuncData data){ - Unlock::UnlockCurrentMap(); + if(Component(LEVEL_COMPLETE,"Stage Complete Label")->GetLabel()!="Stage Summary"){ //If the label says stage summary, we didn't actually complete the level. Don't unlock anything new for the player. + Unlock::UnlockCurrentMap(); + } GameState::ChangeState(States::OVERWORLD_MAP,0.3f); return true; },vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END; diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index a5dbf462..41c82e02 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 0 #define VERSION_PATCH 0 -#define VERSION_BUILD 8585 +#define VERSION_BUILD 8595 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 9a78a38c..a1086d57 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ