]> git.deb.at Git - rhonda/impostor.git/commit
Clean up owned playerinfo's when disconnecting
authorminiduikboot <mini@duikbo.at>
Thu, 20 Jun 2024 20:26:16 +0000 (22:26 +0200)
committerminiduikboot <mini@duikbo.at>
Tue, 20 Aug 2024 19:41:38 +0000 (21:41 +0200)
commit219b72a3d1eccac57a66084463d0df7577a9fdc2
tree0ba91546a8b7988408fbcd095b429d1f3a25cebb
parent01e9cccdf5ac974aca9427f15f0d76390e2ea267
Clean up owned playerinfo's when disconnecting

This commit does what official servers do:
- despawn the PlayerInfo if someone disconnects while in the lobby
- despawn all PlayerInfos at the end of a game when the EndGame screen
is shown. At this point a lot of other netobjects are destroyed as well,
with the PlayerInfos generally done first.
src/Impostor.Server/Net/State/Game.Data.cs
src/Impostor.Server/Net/State/Game.Incoming.cs
src/Impostor.Server/Net/State/Game.Outgoing.cs
src/Impostor.Server/Net/State/Game.State.cs