Blame Sherman for unlocking areas early. Add more leniency for the far zone on analog sticks to reach max speed quicker. Make auto aim target right on closest instead of max aiming distance. Release Build 8595.
This commit is contained in:
parent
a9b860c794
commit
ecde7d1833
@ -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();
|
||||
|
||||
@ -1452,9 +1452,9 @@ const vf2d Player::GetAimingLocation(bool useWalkDir,bool invert){
|
||||
}
|
||||
}
|
||||
if(closestPoint!=vf2d{std::numeric_limits<float>::max(),std::numeric_limits<float>::max()}){
|
||||
geom2d::line<float>aimingLine=geom2d::line<float>(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::line<float>aimingLine=geom2d::line<float>(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();
|
||||
}
|
||||
|
||||
@ -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<float>{{0.f,4.f},{144.f,24.f}},"Leave",[](MenuFuncData data){
|
||||
Unlock::UnlockCurrentMap();
|
||||
if(Component<MenuLabel>(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;
|
||||
|
||||
@ -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
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user