Skip to content

Commit

Permalink
Further prevention of self-awareness of lobby UI elements (FAForever#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Penguin5 authored Apr 19, 2022
1 parent e2b1a00 commit 64812b8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lua/ui/lobby/lobby.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5274,6 +5274,7 @@ local MessageHandlers = {
Handle = function(data)
gameInfo.PlayerOptions[data.OldSlot] = nil
gameInfo.PlayerOptions[data.NewSlot] = PlayerData(data.Options)
gameInfo.PlayerOptions[data.NewSlot].Ready = false
ClearSlotInfo(data.OldSlot)
SetSlotInfo(data.NewSlot, gameInfo.PlayerOptions[data.NewSlot])
UpdateFactionSelectorForPlayer(gameInfo.PlayerOptions[data.NewSlot])
Expand Down Expand Up @@ -6811,10 +6812,6 @@ function DoSlotSwap(slot1, slot2)
player1.Ready = false
player2.Ready = false

-- unready players in GUI
GUI.slots[slot1].ready:SetCheck(false)
GUI.slots[slot2].ready:SetCheck(false)

-- swap teams
local team_bucket = player1.Team
player1.Team = player2.Team
Expand All @@ -6835,6 +6832,8 @@ function DoSlotSwap(slot1, slot2)
-- update faction selector
UpdateFactionSelectorForPlayer(player1)
UpdateFactionSelectorForPlayer(player2)

UpdateGame()
end

function KeepSameFactionOrRandom(slotFrom, slotTo, player)
Expand Down

0 comments on commit 64812b8

Please sign in to comment.