Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR] Fix stuck rumble and polish unranked LRAS #85

Merged
merged 2 commits into from
Dec 26, 2021

Conversation

JLaferri
Copy link
Member

So to be frank I don't understand how rumble works enough to understand exactly why the rumble stuck bug was working but this PR is effectively a work-around while at the same time polishing the LRAS process.

What this PR does:

  1. On an LRAS, the game no longer instantly exits, it will delay for 30 frames for a less jarring exit
  2. The GAME! message is no longer displayed
  3. For the pauser, the start sound plays when they do the local pause and doesn't play when the game is ended
  4. For the non-pauser, the start sound plays when the game is ended
  5. Both clients have their HUD hidden during the 30 frame exit phase

And now some notes about rumble and why the rumble stuck bug was happening prior to this update:

image
The image above shows the rumble messages detected on an LRAS after the first game. The thing to note is that the rumble state is set to 0 for ALL ports once we have returned to the CSS (scene 0x0008). So for the first game, the rumble bug would never happen.

image
This image now shows the same LRAS process but on game 2. In this case my controller was in Port 2 but my character was Port 1 in the game. The message to stop rumble for Port 2 comes in during the in-game scene (0x0208). This message is ignored because Port 2 is not the local player (I'm playing the Port 1 character). The message to stop rumble for Port 1, however, comes in only once we return to the CSS. At this point, the rumble for Port 1 is in fact turned off but the problem is, my controller is in port 2! In this way, rumble is never turned off for the controller in port 2.

Now I don't know why after game 1 the rumble stop messages for the non-local ports start coming in while the scene was still in-game instead of once we've returned to the CSS. Everything would work fine if either all the rumble stop messages happened while still in-game. And so, since I was pretty unhappy with the LRAS process in unranked (it was very jarring). I figured I would just fix/improve that and a side-effect of it would be to fix the rumble bug.

doesn't show any message, HUD gets hidden on both screens, pause sound plays even for the non-pauser, delay time before transitioning away from the game decreased to 30 frames from 110
@beaudry
Copy link

beaudry commented Dec 27, 2021

Can't wait to test this! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants