Fixed pbOnStepTaken being called every frame if you open a menu immediately at the end of a step, fixed Sweet Veil being defined incorrectly

This commit is contained in:
Maruno17
2021-10-10 19:09:36 +01:00
parent 0aad105c6d
commit de0eb8e4e1
2 changed files with 3 additions and 4 deletions

View File

@@ -852,6 +852,8 @@ class Game_Character
def update def update
@moved_last_frame = @moved_this_frame @moved_last_frame = @moved_this_frame
@stopped_last_frame = @stopped_this_frame @stopped_last_frame = @stopped_this_frame
@moved_this_frame = false
@stopped_this_frame = false
if !$game_temp.in_menu if !$game_temp.in_menu
# Update command # Update command
update_command update_command
@@ -921,7 +923,6 @@ class Game_Character
@stopped_this_frame = true @stopped_this_frame = true
elsif !@moved_last_frame || @stopped_last_frame # Started a new step elsif !@moved_last_frame || @stopped_last_frame # Started a new step
calculate_bush_depth calculate_bush_depth
@stopped_this_frame = false
end end
# Increment animation counter # Increment animation counter
@anime_count += 1 if @walk_anime || @step_anime @anime_count += 1 if @walk_anime || @step_anime
@@ -931,8 +932,6 @@ class Game_Character
def update_stop def update_stop
@anime_count += 1 if @step_anime @anime_count += 1 if @step_anime
@stop_count += 1 if !@starting && !lock? @stop_count += 1 if !@starting && !lock?
@moved_this_frame = false
@stopped_this_frame = false
end end
def update_pattern def update_pattern

View File

@@ -200,7 +200,7 @@ BattleHandlers::StatusImmunityAllyAbility.add(:FLOWERVEIL,
} }
) )
BattleHandlers::StatusImmunityAbility.add(:SWEETVEIL, BattleHandlers::StatusImmunityAllyAbility.add(:SWEETVEIL,
proc { |ability,battler,status| proc { |ability,battler,status|
next true if status == :SLEEP next true if status == :SLEEP
} }