Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lua/ui/lobby/autolobby/AutolobbyController.lua
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,15 @@ AutolobbyCommunications = Class(MohoLobbyMethods, AutolobbyServerCommunicationsC
-- put the player where it belongs
self.PlayerOptions[playerOptions.StartSpot] = playerOptions

-- send all player options to the server, this is necessary to do immediately (for the host) so that the server knows who is (not) connected.
for slot, otherPlayerOptions in self.PlayerOptions do
local ownerId = otherPlayerOptions.OwnerID
self:SendPlayerOptionToServer(ownerId, 'Team', otherPlayerOptions.Team)
self:SendPlayerOptionToServer(ownerId, 'Army', otherPlayerOptions.StartSpot)
self:SendPlayerOptionToServer(ownerId, 'StartSpot', otherPlayerOptions.StartSpot)
self:SendPlayerOptionToServer(ownerId, 'Faction', otherPlayerOptions.Faction)
end

-- sync game options with the connected peer
self:SendData(data.SenderID, { Type = "UpdateGameOptions", GameOptions = self.GameOptions })

Expand Down