]> git.deb.at Git - rhonda/impostor.git/commit
Deserialize gamecode as packed in PackedGameDataTo (#738) v1.10.7
authorminiduikboot <mini@duikbo.at>
Fri, 14 Aug 2026 17:47:39 +0000 (19:47 +0200)
committerGitHub <noreply@github.com>
Fri, 14 Aug 2026 17:47:39 +0000 (19:47 +0200)
commit202b955db16b30042b9faaf1e475721f46333120
tree91874d87e76dbffe07f3cd79c9dfa2ff71c54af1
parent1cd298608a82d9d06423a7b4ff496e82cbb6f427
Deserialize gamecode as packed in PackedGameDataTo  (#738)

* Deserialize gamecode as packed in PackedGameDataTo

Most packets use a normal 32 bit int but not PackedGameDataTo. Instead,
Innersloth decided to waste a byte by using WritePacked. As v2 game
codes are always negative, this is less efficient, but alas.

It was documented in the pseudocode and I didn't spot the difference
when reviewing the implementation, so I made this mistake when
deduplicating this code.

Test plan:
- Start EHR on at least 2 clients
- Use the game mode "Natural Disasters"
- Observe that pixelated blobs are visible for all players, not just the host

* uopt: stop parsing code to string

* Address review comments
src/Impostor.Server/Net/Client.cs