]> git.deb.at Git - rhonda/impostor.git/commit
Record and restore player colors
authorminiduikboot <mini@duikbo.at>
Sun, 17 Nov 2024 15:18:49 +0000 (16:18 +0100)
committerminiduikboot <mini@duikbo.at>
Thu, 22 May 2025 21:48:50 +0000 (23:48 +0200)
commit104376b43fba7ce12aae9bce9e217de62453614b
tree05f08e1ec310ea0850b35b77eaef041a46a7bb1c
parent92ca5aa9d7c8a2958a595f0d9f504d4ba5508e64
Record and restore player colors

This prevents situations where a player that requested red has a
different color when rejoining because red is the default color of a
PlayerInfo object. This is most noticeable if the host is late with
rejoining, and a lot of players are alreading in WaitingForHost limbo.

When the host finally rejoins, they will not assign Red immediately to
players that requested Red as it is "in use", and instead assign the
next color.

By recording and restoring this is avoided, and players tend to get
their own colors back in most cases.

This is not something that officials do at the moment, but I don't think
this has an impact on mods, as a normal checkcolor/setcolor cycle will
take place as usual.
src/Impostor.Server/Net/ClientBase.cs
src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs
src/Impostor.Server/Net/State/Game.Data.cs