Skip to content
Browse files

Fixed the battle effects timing logic.

Previously, the timer wasn't reset when an effect was fading,
resulting in making it fade out completely instead of one step
at a time.

To test the difference, try using Defensive stance several time
and wait for it to fade.
  • Loading branch information...
1 parent 50e89ed commit d45bd0a81be99a8d4f9a3e3d22fe6378afb3e507 Yohann Ferreira committed
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/modes/battle/battle_effects.cpp
View
16 src/modes/battle/battle_effects.cpp
@@ -166,14 +166,14 @@ bool BattleStatusEffect::DecrementIntensity(uint8 amount) {
void BattleStatusEffect::_ProcessIntensityChange(bool reset_timer_only) {
- if (reset_timer_only == true) {
- _timer.Reset();
- _timer.Run();
- }
- else {
- _intensity_changed = true;
- _icon_image = BattleMode::CurrentInstance()->GetMedia().GetStatusIcon(_type, _intensity);
- }
+ _timer.Reset();
+ _timer.Run();
+
+ if (reset_timer_only)
+ return;
+
+ _intensity_changed = true;
+ _icon_image = BattleMode::CurrentInstance()->GetMedia().GetStatusIcon(_type, _intensity);
}
////////////////////////////////////////////////////////////////////////////////

0 comments on commit d45bd0a

Please sign in to comment.
Something went wrong with that request. Please try again.