From 8071a5479c0f7ed36384d0d60131ecafa4c2dc6d Mon Sep 17 00:00:00 2001 From: axatin <95587882+axatin@users.noreply.github.com> Date: Sat, 5 Oct 2024 10:01:30 +0200 Subject: [PATCH] Fix non-EUI bug with city banners in observer mode --- (2) Vox Populi/LUA/CityBannerManager.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/(2) Vox Populi/LUA/CityBannerManager.lua b/(2) Vox Populi/LUA/CityBannerManager.lua index 3eea39d28a..26931a0363 100644 --- a/(2) Vox Populi/LUA/CityBannerManager.lua +++ b/(2) Vox Populi/LUA/CityBannerManager.lua @@ -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