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

fix: ignore new player with invalid color id (#267) #268

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

kurokobo
Copy link
Collaborator

Closes #267

Tested in simillar way as described in #267, the issue has been solved.

06:47:32.6093|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "Rounddust", Black, 0, 0, false
06:47:32.6312|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "Rounddust", Black, 0, 0, false
06:47:32.6422|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "Rounddust", Black, 0, 0, false
06:47:32.6422|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "", Unknown, 0, 0, false    👈👈👈👈👈 Player instance created
06:47:32.6422|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "Rounddust", Black, 0, 0, false
06:47:32.6422|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "", Unknown, 0, 0, false
...
06:47:32.9210|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "Rounddust", Black, 0, 0, false
06:47:32.9210|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "", Unknown, 0, 0, false
06:47:32.9210|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "Rounddust", Black, 0, 0, false
06:47:32.9210|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "Twokite", Unknown, 0, 0, false    👈👈👈👈👈 Only name is updated and its color is still -1, no event fired at this time and capture keeps working
06:47:32.9438|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "Rounddust", Black, 0, 0, false
06:47:32.9438|INFO|AmongUsCapture.PlayerInfo|RawPlayerInfo: "Twokite", Red, 0, 0, false    👈👈👈👈👈 Color has been updated
06:47:32.9438|DEBUG|AUCapture_WPF.MainWindow|{"Action":"Joined", "Name":"Twokite", "IsDead":false, "Disconnected":false, "Color":"Red"}    👈👈👈👈👈 "Joined" event fired with correct data

@CarbonNeuron
Could you review this and add new tag like 4.2.1 if this seems ok for you? Thanks.

Copy link
Collaborator

@CarbonNeuron CarbonNeuron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a check that if the number is not a valid color, then to skip it. Instead of modifying the enum?

@kurokobo
Copy link
Collaborator Author

@CarbonNeuron
Thanks, changed to use Enum.IsDefined().

@CarbonNeuron CarbonNeuron merged commit ebcbe17 into automuteus:master Nov 9, 2022
@kurokobo kurokobo deleted the fix-color-id branch June 28, 2023 03:52
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.

AUCapture hangs or crashes due to invalid color code "-1" when another player joins the lobby
2 participants