Fix XP Gain tick rate (25% bar gain every 0.5 seconds). Release Build 7897.

This commit is contained in:
sigonasr2 2024-03-03 23:02:10 -06:00
parent 462710a44d
commit 09a0a16bdc
4 changed files with 6 additions and 4 deletions

View File

@ -60,7 +60,7 @@ void State_LevelComplete::OnStateChange(GameState*prevState){
Component<ProgressBar>(MenuType::LEVEL_COMPLETE,"XP Bar")->ResetProgressBar(game->GetPlayer()->CurrentXP(),game->GetPlayer()->NextLevelXPRequired());
accumulatedXP=game->GetPlayer()->GetAccumulatedXP();
gainRate=(game->GetPlayer()->NextLevelXPRequired()*0.5f)/60.f;
gainRate=(game->GetPlayer()->NextLevelXPRequired()*0.5f);
float xpBonus=1.1f; //10% XP bonus for finishing a stage.
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 reward any stage items to the player.
@ -106,7 +106,7 @@ void State_LevelComplete::OnUserUpdate(AiL*game){
if(accumulatedXP>0){
Audio::Engine().SetVolume(xpGainSound,Audio::GetCalculatedSFXVolume(0.6f));
if(lastXPGain<=0.f){
int incrementAmt=gainRate*game->GetElapsedTime()+1;
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);

View File

@ -35,3 +35,5 @@ Reset tutorials when loading a new character
When opening craft/buy/sell menu, default to the appropriate button.
Pressing back on the Select button of the equip menu causes you to exit the menu.
Funny text colors with text color override on blacksmith menu
Toggle for displaying error messages

View File

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