which a click miles above the invisible RH surface of a tower would
sometimes select that tower.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8833
cda61777-01e9-0310-a592-
d414129be87e
(x - ox >= 0 && x - ox < TILESIZE &&
y - oy >= 0 && y - oy < TILESIZE) ||
/* in triangle between top-left corners? */
- (ox > bx && x >= bx && x <= ox &&
+ (ox > bx && x >= bx && x <= ox && y <= by &&
(by-y) * (ox-bx) <= (by-oy) * (x-bx)) ||
/* in triangle between bottom-right corners? */
(ox > bx && x >= bx+TILESIZE && x <= ox+TILESIZE &&
+ y >= oy+TILESIZE &&
(by-y+TILESIZE)*(ox-bx) >= (by-oy)*(x-bx-TILESIZE))) {
tx = cx;
ty = cy;