Fix XP Gain tick rate (25% bar gain every 0.5 seconds). Release Build 7897.
This commit is contained in:
parent
6a5e36b8da
commit
a26e13fbb6
@ -60,7 +60,7 @@ void State_LevelComplete::OnStateChange(GameState*prevState){
|
|||||||
Component<ProgressBar>(MenuType::LEVEL_COMPLETE,"XP Bar")->ResetProgressBar(game->GetPlayer()->CurrentXP(),game->GetPlayer()->NextLevelXPRequired());
|
Component<ProgressBar>(MenuType::LEVEL_COMPLETE,"XP Bar")->ResetProgressBar(game->GetPlayer()->CurrentXP(),game->GetPlayer()->NextLevelXPRequired());
|
||||||
accumulatedXP=game->GetPlayer()->GetAccumulatedXP();
|
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.
|
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.
|
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){
|
if(accumulatedXP>0){
|
||||||
Audio::Engine().SetVolume(xpGainSound,Audio::GetCalculatedSFXVolume(0.6f));
|
Audio::Engine().SetVolume(xpGainSound,Audio::GetCalculatedSFXVolume(0.6f));
|
||||||
if(lastXPGain<=0.f){
|
if(lastXPGain<=0.f){
|
||||||
int incrementAmt=gainRate*game->GetElapsedTime()+1;
|
int incrementAmt=gainRate*(1/60.f)+1;
|
||||||
accumulatedXP=std::max(0,accumulatedXP-incrementAmt);
|
accumulatedXP=std::max(0,accumulatedXP-incrementAmt);
|
||||||
auto progressBar=Component<ProgressBar>(MenuType::LEVEL_COMPLETE,"XP Bar");
|
auto progressBar=Component<ProgressBar>(MenuType::LEVEL_COMPLETE,"XP Bar");
|
||||||
progressBar->UpdateProgressBar(progressBar->GetCurrentProgress()+incrementAmt);
|
progressBar->UpdateProgressBar(progressBar->GetCurrentProgress()+incrementAmt);
|
||||||
|
@ -35,3 +35,5 @@ Reset tutorials when loading a new character
|
|||||||
When opening craft/buy/sell menu, default to the appropriate button.
|
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.
|
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
|
Funny text colors with text color override on blacksmith menu
|
||||||
|
|
||||||
|
Toggle for displaying error messages
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 4
|
#define VERSION_MINOR 4
|
||||||
#define VERSION_PATCH 4
|
#define VERSION_PATCH 4
|
||||||
#define VERSION_BUILD 7896
|
#define VERSION_BUILD 7897
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user