Returning to camp no longer rewards you stage items. Changed CloseAllMenus() to actually call CloseMenu() multiple times instead to prevent lockouts while holding down menu buttons and having menus closed on (such as getting hit by enemy attacks while in the pause menu). Release Build 7646.
This commit is contained in:
parent
e8ac5a957f
commit
08aa7a309d
@ -639,10 +639,9 @@ std::pair<MenuType,std::string>Menu::GetMemoryLeakReportInfo(){
|
||||
}
|
||||
|
||||
void Menu::CloseAllMenus(){
|
||||
if(stack.size()>0){
|
||||
stack.clear();
|
||||
}else{
|
||||
ERR("WARNING! Trying to close out no menu?? Why are we doing this?")
|
||||
if(stack.size()==0)ERR("WARNING! Trying to close out no menu?? Why are we doing this?");
|
||||
while(stack.size()>0){
|
||||
CloseMenu();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,15 +61,18 @@ void State_LevelComplete::OnStateChange(GameState*prevState){
|
||||
Component<ProgressBar>(MenuType::LEVEL_COMPLETE,"XP Bar")->ResetProgressBar(game->GetPlayer()->CurrentXP(),game->GetPlayer()->NextLevelXPRequired());
|
||||
accumulatedXP=game->GetPlayer()->GetAccumulatedXP();
|
||||
game->GetPlayer()->AddXP(game->GetPlayer()->GetAccumulatedXP());
|
||||
for(const ItemMapData&data:game->GetCurrentMap().GetStageLoot()){
|
||||
uint8_t amountDiff=data.maxAmt-data.minAmt;
|
||||
uint8_t randomAmt=data.maxAmt;
|
||||
if(amountDiff>0){ //This check avoids division by zero.
|
||||
randomAmt=util::random()%(amountDiff+1)+data.minAmt;
|
||||
}
|
||||
for(uint8_t rolls=0;rolls<randomAmt;rolls++){
|
||||
if(util::random(1.0f)<data.chance/100.f){
|
||||
Inventory::AddItem(data.item,1U);
|
||||
|
||||
if(Component<MenuLabel>(LEVEL_COMPLETE,"Stage Complete Label")->GetLabel()!="Stage Summary"){ //If the label says stage summary, we didn't actually the level. Don't reward any stage items to the player.
|
||||
for(const ItemMapData&data:game->GetCurrentMap().GetStageLoot()){
|
||||
uint8_t amountDiff=data.maxAmt-data.minAmt;
|
||||
uint8_t randomAmt=data.maxAmt;
|
||||
if(amountDiff>0){ //This check avoids division by zero.
|
||||
randomAmt=util::random()%(amountDiff+1)+data.minAmt;
|
||||
}
|
||||
for(uint8_t rolls=0;rolls<randomAmt;rolls++){
|
||||
if(util::random(1.0f)<data.chance/100.f){
|
||||
Inventory::AddItem(data.item,1U);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 7644
|
||||
#define VERSION_BUILD 7646
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user