Fixed finding entities finding themselves when targeting their type

This commit is contained in:
trotFunky 2019-06-10 23:22:43 +02:00
parent 058940260a
commit a1bc8058c2

View file

@ -95,7 +95,7 @@ pro_maat::GridPos Rule::findTarget()
for(const auto& processingEntity : sortedEntities) for(const auto& processingEntity : sortedEntities)
{ {
if(processingEntity->getType() != targetType) continue; if(processingEntity->getType() != targetType || processingEntity->getPosition() == entity->getPosition()) continue;
std::vector<pro_maat::GridPos> potentialTargets{}; std::vector<pro_maat::GridPos> potentialTargets{};