summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Villager.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-11-22 18:39:17 +0100
committerMattes D <github@xoft.cz>2014-11-22 18:39:17 +0100
commit075daf9beba238276c78bfe403ab7d724ae8c154 (patch)
tree9a9211795ccf0366f69e8feb7794af2052b48db7 /src/Mobs/Villager.cpp
parentInfoReg: Added a diagnostic for bad Info.lua command info. (diff)
parentformatter error (diff)
downloadcuberite-075daf9beba238276c78bfe403ab7d724ae8c154.tar
cuberite-075daf9beba238276c78bfe403ab7d724ae8c154.tar.gz
cuberite-075daf9beba238276c78bfe403ab7d724ae8c154.tar.bz2
cuberite-075daf9beba238276c78bfe403ab7d724ae8c154.tar.lz
cuberite-075daf9beba238276c78bfe403ab7d724ae8c154.tar.xz
cuberite-075daf9beba238276c78bfe403ab7d724ae8c154.tar.zst
cuberite-075daf9beba238276c78bfe403ab7d724ae8c154.zip
Diffstat (limited to 'src/Mobs/Villager.cpp')
-rw-r--r--src/Mobs/Villager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp
index 5c9999a59..963595347 100644
--- a/src/Mobs/Villager.cpp
+++ b/src/Mobs/Villager.cpp
@@ -37,6 +37,13 @@ bool cVillager::DoTakeDamage(TakeDamageInfo & a_TDI)
m_World->BroadcastEntityStatus(*this, esVillagerAngry);
}
}
+
+ if (a_TDI.DamageType == dtLightning)
+ {
+ Destroy();
+ m_World->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtWitch);
+ return true;
+ }
return true;
}