diff options
author | Mattes D <github@xoft.cz> | 2014-11-23 12:33:04 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-11-23 12:33:04 +0100 |
commit | e9797c6a2a78d1caedc6cc2b6620b34e18a8b41f (patch) | |
tree | 2aabeb2ff85f9d8951b9837e132e4dabed9d6108 /src/Mobs/Villager.cpp | |
parent | cWorld: Changed generator defaults. (diff) | |
parent | Merge pull request #1612 from p-mcgowan/pigsIntoZombiePigmenOnLightning (diff) | |
download | cuberite-e9797c6a2a78d1caedc6cc2b6620b34e18a8b41f.tar cuberite-e9797c6a2a78d1caedc6cc2b6620b34e18a8b41f.tar.gz cuberite-e9797c6a2a78d1caedc6cc2b6620b34e18a8b41f.tar.bz2 cuberite-e9797c6a2a78d1caedc6cc2b6620b34e18a8b41f.tar.lz cuberite-e9797c6a2a78d1caedc6cc2b6620b34e18a8b41f.tar.xz cuberite-e9797c6a2a78d1caedc6cc2b6620b34e18a8b41f.tar.zst cuberite-e9797c6a2a78d1caedc6cc2b6620b34e18a8b41f.zip |
Diffstat (limited to 'src/Mobs/Villager.cpp')
-rw-r--r-- | src/Mobs/Villager.cpp | 7 |
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; } |