diff options
author | p-mcgowan <mickeymcgowan@shaw.ca> | 2014-11-22 08:36:35 +0100 |
---|---|---|
committer | p-mcgowan <mickeymcgowan@shaw.ca> | 2014-11-22 08:36:35 +0100 |
commit | 635e9321c6524d0ba4bba9ce2d716869373fdfac (patch) | |
tree | 8ec12980f5933c22a4406c7ff3c57756b0db0a2b | |
parent | villagers turn into witches when struck by lightning (diff) | |
download | cuberite-635e9321c6524d0ba4bba9ce2d716869373fdfac.tar cuberite-635e9321c6524d0ba4bba9ce2d716869373fdfac.tar.gz cuberite-635e9321c6524d0ba4bba9ce2d716869373fdfac.tar.bz2 cuberite-635e9321c6524d0ba4bba9ce2d716869373fdfac.tar.lz cuberite-635e9321c6524d0ba4bba9ce2d716869373fdfac.tar.xz cuberite-635e9321c6524d0ba4bba9ce2d716869373fdfac.tar.zst cuberite-635e9321c6524d0ba4bba9ce2d716869373fdfac.zip |
-rw-r--r-- | src/Mobs/Villager.cpp | 6 |
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; } |