Repository navigation
Conversation
|
Great addition! Thank you! |
|
I got around to testing with a friend and there's a slight problem: The possible levels than can be voted for aren't synchronized. No problem if ALL levels are present, but very much a problem if there's only 2 or 3. I'm currently looking into that. |
You could add a NetworkedEvent from REPOLib to sync the possibilities |
Known bugs: host can't close the voting page, updating the number in the config doesn't work when in vote/game right now
Added synchronization of available levels.
|
Thanks, I've done that. For some reason the mod vote button doesn't close the vote menu for the host, but for the clients it works. Also updating the number of maps to be voted on while in a lobby doesn't quite work right, you have to restart the lobby to have that change reflected in the menu. Maybe you have an idea for those two points. Everything else seems to work as it should. (the weird merge is there because I accidentally pushed to main instead of the correct branch - sorry) |
|
I'll look into the two problems you've listed. Also I'd like to suggest some things about the implementation, those are (possibly more):
If you want to change those things by yourself, feel free to! |
Non-votable maps are now displayed but disabled. Votable maps (and the random option) are displayed at the top of the list. Player connection event handler gets called directly, without the unnecessary event. VoteOptionButton now has a "Disabled" property with extension methods to change the disabled state. Changing the number of votable maps in the config will re-randomize votable maps according to the number that is configured, even while in game/lobby.
|
Hi, I changed the code based on your suggestions and found a solution for updating the number of maps while in a lobby. The host still can't close the vote popup manually though. I wasn't able to test the changes in multiplayer as I had no one available for testing just now, but I didn't really change anything regarding that, should be fine. I'll test that later, hopefully. |
Client wasn't able to interact with anything except the vote popup in lobby - caused by directly calling HandleOnPlayerConnected instead of letting the client inform the host. Probably because the time differential between the player joining and the host sending the data Votes weren't cleared when re-randomizing the levels on config change, potentially causing disabled levels to be voted Fixed last played level being included in random levels (if config option to disable last played level was true)
|
While testing some bad things popped up: By not utilizing the event the UI somehow got disabled for clients. This seems to be caused by the difference in time the client needs to send the event -> the host receiving it and sending the data -> the client processing it. Because of that I went back to using the event. Now it works as expected! Hope this is good 👍 |
|
@npXXX Thanks! I'll check it out later 👍 |
|
Hey, |
|
@npXXX Does this problem only occur on this Branch, i.e. with your current changes or also on the main branch? |
|
Hi, we tested the original, unmodified version and the problem with the unresponsive menu UI didn't appear. |
|
Thank you! I'll look into that 👍 |

Hi,
my friends and I would like to be able to set the number of levels that can be voted on.
If for example 3 levels should be voteable, this gets 3 random levels from all available ones to be voted on.
Would be great if we could get this merged, maybe others would like it too 👍