Fix crash during auction on real hardware
@@ -1245,21 +1245,17 @@ def change_starting_clothes(self):
def shorten_auction_intro_event(self):
event_list = self.get_arc("files/res/Stage/Orichh/Stage.arc").get_file("event_list.dat")
wind_shrine_event = event_list.events_by_name["AUCTION_START"]
- auction = next(actor for actor in wind_shrine_event.actors if actor.name == "Auction")
camera = next(actor for actor in wind_shrine_event.actors if actor.name == "CAMERA")
pre_pan_delay = camera.actions[2]
pan_action = camera.actions[3]
post_pan_delay = camera.actions[4]
- # Remove the 30 frame delays before and after panning.
- camera.actions.remove(pre_pan_delay)
+ # Remove the 200 frame long panning action and the 30 frame delay after panning.
+ # We don't remove the 30 frame delay before panning, because of the intro is completely removed or only a couple frames long, there is a race condition where the timer entity may not be finished being asynchronously created until the intro is over. If this happens the auction entity will have no reference to the timer entity, causing a crash later on.
+ camera.actions.remove(pan_action)
camera.actions.remove(post_pan_delay)
- # The actual panning action cannot be skipped for some unknown reason. It would appear to work but the game would crash a little bit later.
- # So instead we change the duration of the panning to be only 1 frame long so it appears to be skipped.
- pan_action.get_prop("Timer").value = 1
-
def disable_invisible_walls(self):
# Remove some invisible walls to allow sequence breaking.
# In vanilla switch index FF meant an invisible wall appears only when you have no sword.
