From 635e9321c6524d0ba4bba9ce2d716869373fdfac Mon Sep 17 00:00:00 2001 From: p-mcgowan Date: Fri, 21 Nov 2014 23:36:35 -0800 Subject: villagers turn into witches on lightning --- src/Mobs/Villager.cpp | 6 ++++-- 1 file 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; } -- cgit v1.2.3