Fixed softlock when opening menu
If you opened the fast travel or the item menu right before touching a touch-run event, it would soft-lock you if the event changed niko's move-route, since niko was unable to move due to his update function being unreached.
This commit is contained in:
parent
f9a43eff45
commit
4fec45be25
|
|
@ -175,7 +175,7 @@ class Game_Player < Game_Character
|
||||||
# If moving, event running, move route forcing, and message window
|
# If moving, event running, move route forcing, and message window
|
||||||
# display are all not occurring
|
# display are all not occurring
|
||||||
unless $game_system.map_interpreter.running? or @move_route_forcing or
|
unless $game_system.map_interpreter.running? or @move_route_forcing or
|
||||||
$game_temp.message_window_showing
|
$game_temp.message_window_showing or $game_temp.menus_visible
|
||||||
# Adjust move speed
|
# Adjust move speed
|
||||||
@move_speed = Input.press?(Input::RUN) ? 4 : 3
|
@move_speed = Input.press?(Input::RUN) ? 4 : 3
|
||||||
unless moving?
|
unless moving?
|
||||||
|
|
@ -235,7 +235,7 @@ class Game_Player < Game_Character
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# If not moving
|
# If not moving
|
||||||
unless moving?
|
unless moving? or $game_temp.menus_visible
|
||||||
# If player was moving last time
|
# If player was moving last time
|
||||||
if last_moving
|
if last_moving
|
||||||
# Event determinant is via touch of same position event
|
# Event determinant is via touch of same position event
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ class Game_Temp
|
||||||
attr_accessor :footstep_sfx # current footstep sfx array
|
attr_accessor :footstep_sfx # current footstep sfx array
|
||||||
attr_accessor :filmsprite # film puzzle sprite
|
attr_accessor :filmsprite # film puzzle sprite
|
||||||
attr_accessor :prompt_wait # wait for delay caused by prompt
|
attr_accessor :prompt_wait # wait for delay caused by prompt
|
||||||
|
attr_accessor :menus_visible
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# * Object Initialization
|
# * Object Initialization
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
|
|
@ -119,6 +120,7 @@ class Game_Temp
|
||||||
@footstep_sfx = nil
|
@footstep_sfx = nil
|
||||||
@filmsprite = nil
|
@filmsprite = nil
|
||||||
@prompt_wait = 0
|
@prompt_wait = 0
|
||||||
|
@menus_visible = false
|
||||||
end
|
end
|
||||||
|
|
||||||
def bgm_fadein(game_system)
|
def bgm_fadein(game_system)
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,8 @@ class Scene_Map
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
$game_system.map_interpreter.update
|
$game_system.map_interpreter.update
|
||||||
$game_player.update if !@menu.visible && !@item_menu.visible && !@fast_travel.visible
|
$game_temp.menus_visible = @menu.visible || @item_menu.visible || @fast_travel.visible
|
||||||
|
$game_player.update
|
||||||
$game_followers.each{|f| f.update}
|
$game_followers.each{|f| f.update}
|
||||||
# Update system (timer), screen
|
# Update system (timer), screen
|
||||||
$game_system.update
|
$game_system.update
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue