summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/Villager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp
index 371132dfb..6bf88bd80 100644
--- a/src/Mobs/Villager.cpp
+++ b/src/Mobs/Villager.cpp
@@ -37,10 +37,12 @@ bool cVillager::DoTakeDamage(TakeDamageInfo & a_TDI)
m_World->BroadcastEntityStatus(*this, esVillagerAngry);
}
}
+
if (a_TDI.DamageType == dtLightning)
{
- m_World->SpawnMob((int) GetPosX(), (int) GetPosY(), (int) GetPosZ(), mtWitch);
- super::Destroy(this);
+ Destroy();
+ m_World->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtWitch);
+ return true;
}
return true;
}