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

Really fix SetInfectedAsync's packet structure #279

Closed
wants to merge 1 commit into from
Closed

Really fix SetInfectedAsync's packet structure #279

wants to merge 1 commit into from

Conversation

libhalt
Copy link

@libhalt libhalt commented Jan 9, 2021

Description

New Impostor list is prefixed with the list's length not the host's netid

Use Case & Test
https://gist.github.com/libhalt/e3f98c717a29514dcc259c6ca9c7f708

@libhalt libhalt changed the title Really fix SetInfectedAsync packet structure Really fix SetInfectedAsync's packet structure Jan 9, 2021
@js6pak
Copy link
Member

js6pak commented Jan 9, 2021

Even if the packet is now correct, are you sure your use case is even working? (without any side effects)

@libhalt
Copy link
Author

libhalt commented Jan 9, 2021

The above test plugin has been tested locally on itch version of the game with 5 locally running clients.
(the game end screen showed the correct impostor, only the impostor had red name tag , etc)

@Elsensee
Copy link

He meant, it's usually not possible to set the impostors without client-side modifications.
Either the host would be de-synced or the clients would ignore the change (depending on when you send the SetInfectedRPC)

@libhalt
Copy link
Author

libhalt commented Jan 25, 2021

I agree with your/his statement that this only works at a very specific situation but it is usefull at that very spefic situation. Initially, i thought about limiting the call to during IGameStartingEvent but that is a "breaking change" that would require edit of the doc (although i cant imagine any plugin using this method outside the limit that will be imposed as it would be non functional) and outside the scope of this PR. This PR is focused on fixing the packet structure and I thought that by focusing on fixing the packe structure this change would be merged easier as their were previous attempts at fixing the packet structure despite the known limitation (2ea270d) . However, if the maintainers wish this method to be limited I can add that in

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.

None yet

3 participants