aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/DefendVillageTargetGoal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.World/DefendVillageTargetGoal.cpp')
-rw-r--r--Minecraft.World/DefendVillageTargetGoal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Minecraft.World/DefendVillageTargetGoal.cpp b/Minecraft.World/DefendVillageTargetGoal.cpp
index 201738a3..6ed6af53 100644
--- a/Minecraft.World/DefendVillageTargetGoal.cpp
+++ b/Minecraft.World/DefendVillageTargetGoal.cpp
@@ -12,7 +12,7 @@ DefendVillageTargetGoal::DefendVillageTargetGoal(VillagerGolem *golem) : TargetG
bool DefendVillageTargetGoal::canUse()
{
shared_ptr<Village> village = golem->getVillage();
- if (village == nullptr) return false;
+ if (village == NULL) return false;
potentialTarget = weak_ptr<LivingEntity>(village->getClosestAggressor(dynamic_pointer_cast<LivingEntity>(golem->shared_from_this())));
shared_ptr<LivingEntity> potTarget = potentialTarget.lock();
if (!canAttack(potTarget, false))