summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Villager.cpp
diff options
context:
space:
mode:
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 0efd5501e..781816c75 100644
--- a/src/Mobs/Villager.cpp
+++ b/src/Mobs/Villager.cpp
@@ -30,6 +30,13 @@ bool cVillager::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
+ if (a_TDI.DamageType == dtLightning)
+ {
+ Destroy();
+ GetWorld()->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtWitch);
+ return true;
+ }
+
if ((a_TDI.Attacker != NULL) && a_TDI.Attacker->IsPlayer())
{
if (m_World->GetTickRandomNumber(5) == 3)