Open mishagp opened 7 months ago
Tried to reproduce this myself but was unable to initially. https://github.com/mishagp/PauseInMultiplayer/assets/6118330/c6cbf542-0e2a-4bc2-bb0f-f259414b47ca
Judging from bug reports on the mod's previous Nexus page it seems like this is definitely something folks are experiencing, but not sure what specifically seems to be triggering this state.
I'd welcome more investigation into a reproduction and/or fix!
heya using 2 controllers I was easily able to reproduce the error in a local coop session. here are some of my observations so far:
don't work in local split screen mode.
Here we go. It bothered me a LOT. Enaugh to have a look at the source code and to debug it.
From what I've seen its pretty easy to reproduce and it solely happens if you play split-screen-coop.
What happens in detail?
bool votePause = false;
https://github.com/mishagp/PauseInMultiplayer/blob/b5e2001de2f2e284fb6508b44e887dd0eb1f1cf0/PauseInMultiplayer/PauseInMultiplayer.cs#L40C9-L40C32
This state is shared between all local instances. So either guarding against double write access (local / split-partner) or removing it entirely and replacing this state with something that is bound to the Game1.player.UniqueMultiplayerID
should fix it. FYI, I am in the midst of rewriting the main functionality already. @mishagp if you like I can drop it here as a large PR but it'll be a large change throughout the code.
Reported on Nexus Mods: