summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
authorp-mcgowan <mickeymcgowan@shaw.ca>2014-11-22 08:20:44 +0100
committerp-mcgowan <mickeymcgowan@shaw.ca>2014-11-22 08:20:44 +0100
commitac2e3ede1d9cd76aec851e50a2312a4ab548b25a (patch)
tree38ef2fc55fb8ad61baa4f1f2f4cbcfd735ec04e4 /src/Mobs
parentMerge pull request #1594 from mc-server/LargeOakTree (diff)
downloadcuberite-ac2e3ede1d9cd76aec851e50a2312a4ab548b25a.tar
cuberite-ac2e3ede1d9cd76aec851e50a2312a4ab548b25a.tar.gz
cuberite-ac2e3ede1d9cd76aec851e50a2312a4ab548b25a.tar.bz2
cuberite-ac2e3ede1d9cd76aec851e50a2312a4ab548b25a.tar.lz
cuberite-ac2e3ede1d9cd76aec851e50a2312a4ab548b25a.tar.xz
cuberite-ac2e3ede1d9cd76aec851e50a2312a4ab548b25a.tar.zst
cuberite-ac2e3ede1d9cd76aec851e50a2312a4ab548b25a.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Villager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp
index 5c9999a59..371132dfb 100644
--- a/src/Mobs/Villager.cpp
+++ b/src/Mobs/Villager.cpp
@@ -37,6 +37,11 @@ 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);
+ }
return true;
}