Fix a bug where hp recovery when at full health still applied passive hp recovery effects. Fix bug with volume transitions not respecting the user's set volume controls when adjusting audio events. Add debris spawning for second bonus boss. Release Build 9522.
This commit is contained in:
@@ -250,9 +250,9 @@ const int Player::GetHealth()const{
|
||||
return hp;
|
||||
}
|
||||
|
||||
const float Player::GetMaxHealth()const{
|
||||
const int Player::GetMaxHealth()const{
|
||||
const float hpPctIncrease=GetStat("Health")*GetStat("Health %")/100.f;
|
||||
return GetStat("Health")+hpPctIncrease;
|
||||
return int(GetStat("Health")+hpPctIncrease);
|
||||
}
|
||||
|
||||
const int Player::GetMana()const{
|
||||
@@ -809,7 +809,7 @@ bool Player::Hurt(int damage,bool onUpperLevel,float z){
|
||||
|
||||
hurtRumbleTime="Player.Hurt Rumble Time"_F;
|
||||
Input::StartVibration();
|
||||
Input::SetLightbar(PixelLerp(DARK_RED,GREEN,GetHealth()/GetMaxHealth()));
|
||||
Input::SetLightbar(PixelLerp(DARK_RED,GREEN,GetHealth()/float(GetMaxHealth())));
|
||||
|
||||
if(lastHitTimer>0){
|
||||
damageNumberPtr.get()->damage+=int(mod_dmg);
|
||||
@@ -821,7 +821,7 @@ bool Player::Hurt(int damage,bool onUpperLevel,float z){
|
||||
}
|
||||
lastHitTimer=0.05f;
|
||||
|
||||
if(!lowHealthSoundPlayed&&lowHealthSoundPlayedTimer==0.f&&GetHealth()/GetMaxHealth()<="Player.Health Warning Pct"_F/100.f){
|
||||
if(!lowHealthSoundPlayed&&lowHealthSoundPlayedTimer==0.f&&GetHealth()/float(GetMaxHealth())<="Player.Health Warning Pct"_F/100.f){
|
||||
SoundEffect::PlaySFX("Health Warning",SoundEffect::CENTERED);
|
||||
lowHealthSoundPlayed=true;
|
||||
lowHealthSoundPlayedTimer="Player.Health Warning Cooldown"_F;
|
||||
@@ -1088,7 +1088,7 @@ bool Player::Heal(int damage,bool suppressDamageNumber){
|
||||
if(!suppressDamageNumber&&damage>0){
|
||||
DAMAGENUMBER_LIST.push_back(std::make_shared<DamageNumber>(GetPos(),damage,true,HEALTH_GAIN));
|
||||
}
|
||||
Input::SetLightbar(PixelLerp(DARK_RED,GREEN,GetHealth()/GetMaxHealth()));
|
||||
Input::SetLightbar(PixelLerp(DARK_RED,GREEN,GetHealth()/float(GetMaxHealth())));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1358,7 +1358,7 @@ void Player::PerformHPRecovery(){
|
||||
Heal(hpRecoveryAmt);
|
||||
}
|
||||
|
||||
if(GetHealth()/GetMaxHealth()>"Player.Health Warning Pct"_F/100.f){
|
||||
if(GetHealth()/float(GetMaxHealth())>"Player.Health Warning Pct"_F/100.f){
|
||||
lowHealthSoundPlayed=false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user