Fix static animation bug for controllers when using the DPad for character navigation. Fix bug allowing players to unlock the next areas by hitting the Return to Camp button even if they did not complete the stage. Release Build 8585.

This commit is contained in:
sigonasr2 2024-03-29 23:07:55 -05:00
parent 71acd6ef7d
commit ddfe0cf13d
5 changed files with 10 additions and 20 deletions

View File

@ -478,10 +478,7 @@ void AiL::HandleUserInput(float fElapsedTime){
animationSpd=controllerAmt; animationSpd=controllerAmt;
} }
moveAmt*=controllerAmt; moveAmt*=controllerAmt;
}else }else animationSpd=1.f;
if(!Input::UsingGamepad()){
animationSpd=1.f;
}
player->SetX(player->GetX()+fElapsedTime*moveAmt*player->GetMoveSpdMult()); player->SetX(player->GetX()+fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.x=moveAmt*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.x=moveAmt*fElapsedTime*player->GetMoveSpdMult();
if(staircaseDirection=="RIGHT"){ if(staircaseDirection=="RIGHT"){
@ -508,10 +505,7 @@ void AiL::HandleUserInput(float fElapsedTime){
animationSpd=controllerAmt; animationSpd=controllerAmt;
} }
moveAmt*=abs(KEY_SCROLLHORZ_L.Analog()); moveAmt*=abs(KEY_SCROLLHORZ_L.Analog());
}else }else animationSpd=1.f;
if(!Input::UsingGamepad()){
animationSpd=1.f;
}
player->SetX(player->GetX()-fElapsedTime*moveAmt*player->GetMoveSpdMult()); player->SetX(player->GetX()-fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.x=-moveAmt*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.x=-moveAmt*fElapsedTime*player->GetMoveSpdMult();
if(staircaseDirection=="RIGHT"){ if(staircaseDirection=="RIGHT"){
@ -537,10 +531,7 @@ void AiL::HandleUserInput(float fElapsedTime){
animationSpd=controllerAmt; animationSpd=controllerAmt;
} }
moveAmt*=abs(KEY_SCROLLVERT_L.Analog()); moveAmt*=abs(KEY_SCROLLVERT_L.Analog());
}else }else animationSpd=1.f;
if(!Input::UsingGamepad()){
animationSpd=1.f;
}
player->SetY(player->GetY()-fElapsedTime*moveAmt*player->GetMoveSpdMult()); player->SetY(player->GetY()-fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.y=-moveAmt*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.y=-moveAmt*fElapsedTime*player->GetMoveSpdMult();
@ -558,10 +549,7 @@ void AiL::HandleUserInput(float fElapsedTime){
animationSpd=controllerAmt; animationSpd=controllerAmt;
} }
moveAmt*=abs(KEY_SCROLLVERT_L.Analog()); moveAmt*=abs(KEY_SCROLLVERT_L.Analog());
}else }else animationSpd=1.f;
if(!Input::UsingGamepad()){
animationSpd=1.f;
}
player->SetY(player->GetY()+fElapsedTime*moveAmt*player->GetMoveSpdMult()); player->SetY(player->GetY()+fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.y=moveAmt*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.y=moveAmt*fElapsedTime*player->GetMoveSpdMult();

View File

@ -79,8 +79,10 @@ void Menu::InitializeLevelCompleteWindow(){
}; };
auto nextButtonAction=[](MenuFuncData data){ auto nextButtonAction=[](MenuFuncData data){
Unlock::UnlockArea(State_OverworldMap::GetCurrentConnectionPoint().map); 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.
Merchant::RandomizeTravelingMerchant(); Unlock::UnlockArea(State_OverworldMap::GetCurrentConnectionPoint().map);
Merchant::RandomizeTravelingMerchant();
}
State_LevelComplete::TurnOffXPSound(); State_LevelComplete::TurnOffXPSound();
GameState::ChangeState(States::GAME_HUB,0.25f); GameState::ChangeState(States::GAME_HUB,0.25f);
return true; return true;

View File

@ -48,7 +48,7 @@ INCLUDE_DATA
void SteamStatsReceivedHandler::SteamStatsReceived( UserStatsReceived_t* pCallback ){ void SteamStatsReceivedHandler::SteamStatsReceived( UserStatsReceived_t* pCallback ){
if(pCallback->m_eResult==k_EResultOK){ if(pCallback->m_eResult==k_EResultOK){
SteamUserStats()->GetStat("Achievement.Kill Unlocks.Total Kill API Name"_S.c_str(),&Unlock::monsterKillCount); SteamUserStats()->GetStat("Achievement.Kill Unlocks.Total Kill API Name"_S.c_str(),&Unlock::monsterKillCount);
LOG(std::format("Retrived monster kill count: {}",Unlock::monsterKillCount)); LOG(std::format("Retrieved monster kill count: {}",Unlock::monsterKillCount));
} }
} }
#endif #endif

View File

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1 #define VERSION_MAJOR 1
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_PATCH 0 #define VERSION_PATCH 0
#define VERSION_BUILD 8582 #define VERSION_BUILD 8585
#define stringify(a) stringify_(a) #define stringify(a) stringify_(a)
#define stringify_(a) #a #define stringify_(a) #a