Returning to camp/map after dying now lets you obtain already collected resources/XP. Fix bug with XP bar display (visual error) in the level complete window. Release Build 7969.

pull/35/head
sigonasr2 9 months ago
parent dec1f0516f
commit 68bdb6bc26
  1. 6
      Adventures in Lestoria/DeathMenu.cpp
  2. 8
      Adventures in Lestoria/State_LevelComplete.cpp
  3. 2
      Adventures in Lestoria/Version.h
  4. BIN
      x64/Release/Adventures in Lestoria.exe

@ -55,11 +55,7 @@ void Menu::InitializeDeathWindow(){
return true;
},ButtonAttr::FIT_TO_LABEL)END;
deathWindow->ADD("Return to Camp Button",MenuComponent)(geom2d::rect<float>{{6.f,28.f},{84.f,24.f}},"Return to Camp",[](MenuFuncData data){
if(!Unlock::IsUnlocked("STORY_1_1")){
GameState::ChangeState(States::OVERWORLD_MAP);
}else{
GameState::ChangeState(States::GAME_HUB);
}
Component<MenuComponent>(MenuType::PAUSE,"Return to Camp Button")->Click();
return true;
},ButtonAttr::FIT_TO_LABEL)END;

@ -106,9 +106,13 @@ void State_LevelComplete::OnUserUpdate(AiL*game){
Audio::Engine().SetVolume(xpGainSound,Audio::GetCalculatedSFXVolume(0.6f));
if(lastXPGain<=0.f){
int incrementAmt=gainRate*(1/60.f)+1;
accumulatedXP=std::max(0,accumulatedXP-incrementAmt);
auto progressBar=Component<ProgressBar>(MenuType::LEVEL_COMPLETE,"XP Bar");
progressBar->UpdateProgressBar(progressBar->GetCurrentProgress()+incrementAmt);
if(accumulatedXP-incrementAmt<0){
progressBar->UpdateProgressBar(progressBar->GetCurrentProgress()+accumulatedXP);
}else{
progressBar->UpdateProgressBar(progressBar->GetCurrentProgress()+incrementAmt);
}
accumulatedXP=std::max(0,accumulatedXP-incrementAmt);
if(progressBar->GetCurrentProgress()>=progressBar->GetFinalProgress()){
levelUpTextPos=Menu::menus[LEVEL_COMPLETE]->pos+Component<MenuLabel>(LEVEL_COMPLETE,"Level Display")->GetPos()+Component<MenuLabel>(LEVEL_COMPLETE,"Level Display")->GetSize();
levelUpTimer="Interface.HUD Level Up Timer"_F;

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 4
#define VERSION_PATCH 5
#define VERSION_BUILD 7967
#define VERSION_BUILD 7969
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save