UFO: Alien Invasion Issue Tracker
Please log in to bookmark issues
CLOSED  Bug report #31  -  Clicking on base facilities does not work right
Posted Mar 10, 2006 - updated Jan 28, 2013
icon_info.png This issue has been closed with status "Closed" and resolution "Not determined".
Issue details
  • Type of issue
    Bug report
  • Status
  • Assigned to
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
  • Owned by
    Not owned by anyone
  • Estimated time
    Not estimated
  • Category
  • Resolution
    Not determined
  • Priority
    3. Normal
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Targetted for
    icon_milestones.png Not determined
  • Complexity
    icon_customdatatype.png Not determined
  • Platform
    icon_customdatatype.png Not determined
  • Architecture
    icon_customdatatype.png Not determined
Issue description
Item 31 imported from sourceforge.net tracker on 2013-01-28 18:08:35

Clicking on the base facilities in the prefab base does not always call up the info text for that facility. Nothing happens for certain facilities. This has to do with the placement on the grid. Clicking in certain empty areas of the base grid will call up the description text for a facility.
Comments Ported from Sourceforge  ⇑ top
hoehrer (2006-04-07 07:40:49)  ⇑ top
Logged In: YES user_id=1434318

I'm currently investigating this.

Seems to be an offset-problem that effects placement of the images, but not the checking of the mouse-coordinates.

Adding a "+71" to "y" (see below .. the comments are not from me) helps, but i need to check where and why that is the case ... especially the fixed value(s) is(are) kinda bad style.

cl_basemanagement.c line 1401+
================= ⇑ top
x = ( BASE_SIZE * 326 + ( rowCnt * 186 ) - bvCenterX ) * bvScale; y = ( ( rowCnt * 280 ) - bvCenterY ) * bvScale; // 512 - 71 => 71 pixel overlap
================= ⇑ top
hoehrer (2006-04-07 17:20:40)  ⇑ top
Logged In: YES user_id=1434318

ok, i've added some debug code, to show the problem (mattn, this might interest you) just set the "#if 0" to "#if 1" in "MN_DrawBase"

The problem is that the base-map is drawn from square images, with a isometric image on it ... the corners are transparent.

  • = building
  • = invisible

So the invisible parts are still used for click-actions smileys/4.png

Possible solutions

  • The easiest solution would be to change the base-view to
top-down, but i assume the 3d-models of the buildings are not designed for that.

  • One possible solution would be to provide a click-mask
(basically a black/white image that defines where the building is (could even be the alhpa-map of the builing-images) and read from that on mouseclick/mousover ... I dunno how easy that is.

  • The most accurate solution would be to display the
building as real-3d, but for that textures (and maybe even polycount) should be decreaded a bit if performance is going down. Not to mention the work involved smileys/4.png

tlh2000 (2006-05-04 18:51:28)  ⇑ top
Logged In: YES user_id=116930

This is fixed with the new baseview
Steps to reproduce this issue
Nothing entered.