]> git.deb.at Git - rhonda/impostor.git/commit
Add Host property to IGameCreatedEvent
authorminiduikboot <mini@duikbo.at>
Fri, 12 Apr 2024 20:42:27 +0000 (22:42 +0200)
committerminiduikboot <mini@duikbo.at>
Fri, 12 Apr 2024 20:53:01 +0000 (22:53 +0200)
commit2c0f45c5d15869d1d03f400b42e9d9e9ef339e47
tree81d0989561078c7705ab23968567d0fc373b6a5c
parent9b7b1e8b2681f754c832019025b38ec174544363
Add Host property to IGameCreatedEvent

When a game has just been created, it does not yet have any players in
them, and as a result you can't get the host or its connection id when
this event is called. This makes it annoying to link between this event
and the IGameCreationEvent that came just before it.

Having this link is useful for the usecase of a game code allocation
plugin that allocates codes from a pool, and needs to return codes to
a pool if these codes weren't picked.
src/Impostor.Api/Events/Game/IGameCreatedEvent.cs
src/Impostor.Server/Events/Game/GameCreatedEvent.cs
src/Impostor.Server/Net/Manager/GameManager.cs