RoomTransition.StartBossIntro crashes the game
It makes its way to the actual function itself from lua just fine, but something may have changed in how zhl files are processed along the way that impacted this one in some way. Tried changing the int params to uint, since thats what ghidra says they are, but it didnt fix much.
The issue comes from the fact the game does not properly reset the ID of the current room when pressing R, using the "stage", "reseed" or "restart" commands. As the game uses the ID of the current room in StartBossIntro, if the ID refers to a no longer existing room then the game will crash accessing an invalid room descriptor.
I see two solutions:
- Find a way to fix the game not properly changing the ID of the current room, but this would require us to find every place where this behavior happens
- If the current room ID is invalid, then in the binder for StartBossIntro try to fix it. This doesn't solve the underlying issue, but requires a single fix
Fixed in aaac8bb