From 6dea063a4a2ab499a7068d97caf54cdecd0f79be Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 18 Apr 2024 17:33:28 +0200 Subject: [PATCH] Objects of different type are different --- TrackedObject.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TrackedObject.cpp b/TrackedObject.cpp index a7a4ccb..c1eeb1b 100644 --- a/TrackedObject.cpp +++ b/TrackedObject.cpp @@ -21,6 +21,8 @@ InterestingThing::InterestingThing(Sensor *sensor, Spherical position, bool InterestingThing::IsTheSameAs(InterestingThing *otherObj) { if (id != 0 && id == otherObj->id) return true; + if (type != otherObj->type) + return false; if (fabsf(position.distance - otherObj->position.distance) > equalityDistance) return false; if (fabsf(position.horizontalAngle - otherObj->position.horizontalAngle) >