Black rectangle over Map

This is for troubleshooting of problems with the FAF client and Forged Alliance game.

Moderator: PhilipJFry

Re: Black rectangle over Map

Postby Viba » 10 Nov 2016, 18:17

The coordinates are relative to screen position, not world position, so can't use them to find faults. I did some changes and I'm testing them out, so far no black boxes. Also idle engineers mod now puts labels on units you get when you get a base via full share.
Viba
Councillor - Moderation
 
Posts: 746
Joined: 22 Jan 2015, 21:42
Has liked: 144 times
Been liked: 224 times
FAF User Name: !smurfcheck Viba

Re: Black rectangle over Map

Postby Ejsstiil » 28 Jan 2017, 21:55

Same problem here. This patch worked for me. Thanks to yorick to finding, i only added destroying bad overlays.

Code: Select all
uid = "ecbf6277-24e3-437a-b968-EcoManager-v7"

Code: Select all
\EM\modules\mexes.lua

Code: Select all
   overlay.OnFrame = function(self, delta)
      if not unit:IsDead() then
         local worldView = import('/lua/ui/game/worldview.lua').viewLeft
         local pos = worldView:Project(unit:GetPosition())
         if pos.x >=0 or pos.y >=0 then
            LayoutHelpers.AtLeftTopIn(overlay, worldView, pos.x - overlay.Width() / 2, pos.y - overlay.Height() / 2 + 1)
         else
            overlay.destroy = true
            overlay:Hide()
            --LOG('Bad position: ('..pos.x..'/'..pos.y..')')
         end
         
      else
         overlay.destroy = true
         overlay:Hide()
      end
   end
Ejsstiil
 
Posts: 4
Joined: 28 Jan 2017, 20:32
Has liked: 1 time
Been liked: 0 time
FAF User Name: Ejsstiil

Re: Black rectangle over Map

Postby ArtVC » 11 May 2020, 16:35

There is a bug with UpdateMexOverlay, i think, because after upgrading mex from T1 up to T2 sometimes i get the black rectangler from left top corner.

--edited
And i don't get in mind why there is "or", but looks like there is should be "and"
if pos.x >=0 or pos.y >=0 then

--edited
Made a code like in attachment - one game on middle size map gone well. Will test it later again and again.
Attachments
mexes.lua
On create&update mex overlay checks that X and Y > 0= both
(6.89 KiB) Downloaded 19 times
ArtVC
 
Posts: 9
Joined: 13 May 2017, 19:30
Has liked: 0 time
Been liked: 0 time
FAF User Name: ArtVC

Previous

Return to Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest