diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-11-29 12:05:35 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-11-29 12:05:35 +0100 |
commit | 648fee1a087cb97da9a4646d72ffc590e7837a67 (patch) | |
tree | eb55b68428a303089bc1120e9c3593542059f18e /src/Mobs/Villager.cpp | |
parent | Finished mob spawner implementation. (diff) | |
parent | Merge pull request #1619 from mc-server/WarningFixes (diff) | |
download | cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar.gz cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar.bz2 cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar.lz cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar.xz cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar.zst cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.zip |
Diffstat (limited to '')
-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; } |