From 8199b7d036e391784593fc24e7d4910261d1aad6 Mon Sep 17 00:00:00 2001 From: trotFunky Date: Mon, 10 Jun 2019 23:22:43 +0200 Subject: [PATCH] Fixed finding entities finding themselves when targeting their type --- src/Rule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rule.cpp b/src/Rule.cpp index adc9737..22682fc 100644 --- a/src/Rule.cpp +++ b/src/Rule.cpp @@ -95,7 +95,7 @@ pro_maat::GridPos Rule::findTarget() for(const auto& processingEntity : sortedEntities) { - if(processingEntity->getType() != targetType) continue; + if(processingEntity->getType() != targetType || processingEntity->getPosition() == entity->getPosition()) continue; std::vector potentialTargets{};