Skip to content

Commit

Permalink
Fix non-EUI bug with city banners in observer mode
Browse files Browse the repository at this point in the history
  • Loading branch information
axatin committed Oct 5, 2024
1 parent 35843bb commit 8071a54
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion (2) Vox Populi/LUA/CityBannerManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,16 @@ function OnCityDestroyed(hexPos, playerID, cityID, newPlayerID)
local active_team = Players[Game.GetActivePlayer()]:GetTeam();
local team = Players[playerID]:GetTeam();

if(active_team ~= team)
local globalObserverMode = false
if Players[Game.GetActivePlayer()]:IsObserver() then
if Game:GetObserverUIOverridePlayer() == -1 then
globalObserverMode = true
else
active_team = Players[Game:GetObserverUIOverridePlayer()]:GetTeam();
end
end

if(active_team ~= team and not globalObserverMode)
then
g_OtherIM:ReleaseInstance( banner.SubControls );
else
Expand Down

0 comments on commit 8071a54

Please sign in to comment.