mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-08 04:08:36 +01:00
parent
3719f60de0
commit
87f4d37de3
@ -373,8 +373,10 @@ bool LinkGraphOverlay::ShowTooltip(Point pt, TooltipCloseCondition close_cond)
|
|||||||
std::sqrt((ptb.x - pta.x) * (ptb.x - pta.x) + (ptb.y - pta.y) * (ptb.y - pta.y));
|
std::sqrt((ptb.x - pta.x) * (ptb.x - pta.x) + (ptb.y - pta.y) * (ptb.y - pta.y));
|
||||||
const auto &link = j->second;
|
const auto &link = j->second;
|
||||||
if (dist <= 4 && link.Usage() > 0 &&
|
if (dist <= 4 && link.Usage() > 0 &&
|
||||||
pt.x >= std::min(pta.x, ptb.x) &&
|
pt.x + 2 >= std::min(pta.x, ptb.x) &&
|
||||||
pt.x <= std::max(pta.x, ptb.x)) {
|
pt.x - 2 <= std::max(pta.x, ptb.x) &&
|
||||||
|
pt.y + 2 >= std::min(pta.y, ptb.y) &&
|
||||||
|
pt.y - 2 <= std::max(pta.y, ptb.y)) {
|
||||||
static char buf[1024];
|
static char buf[1024];
|
||||||
char *buf_end = buf;
|
char *buf_end = buf;
|
||||||
buf[0] = 0;
|
buf[0] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user