aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--problem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/problem.cpp b/problem.cpp
index bc8f1d0..a4c6aca 100644
--- a/problem.cpp
+++ b/problem.cpp
@@ -66,7 +66,8 @@ bool hilare_a_mvt::intersects(const obstacle &o) const {
return false;
}
- if (o.c.r >= segment(from.pos(),to.pos()).dist(o.c.c))return true ;
+ if (o.c.r + p->r_c_car >= segment(from.pos(),to.pos()).dist(o.c.c)) return true ;
+ if (o.c.r + p->r_c_trolley >= segment(from.pos_trolley(),to.pos_trolley()).dist(o.c.c)) return true ;
return false;
}