From ba5312c198a7bb31b26fba57a966f16f07de1c90 Mon Sep 17 00:00:00 2001 From: 12xx12 <44411062+12xx12@users.noreply.github.com> Date: Thu, 17 Sep 2020 20:06:41 +0200 Subject: Fixed snow golems and added documentation to damage type and added damage type for damage from environment to mobs (#4877) * made snow golems not crashing the server anymore * changed damage type to environment * updated damage in API dopcumentation and changed enderman damage type * removed incidental d in the code Co-authored-by: 12xx12 <12xx12100@gmail.com> --- src/Mobs/SnowGolem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Mobs/SnowGolem.cpp') diff --git a/src/Mobs/SnowGolem.cpp b/src/Mobs/SnowGolem.cpp index 2e6d5ea09..93c29cafb 100644 --- a/src/Mobs/SnowGolem.cpp +++ b/src/Mobs/SnowGolem.cpp @@ -38,7 +38,7 @@ void cSnowGolem::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) } if (IsBiomeNoDownfall(m_World->GetBiomeAt(POSX_TOINT, POSZ_TOINT))) { - TakeDamage(*this); + TakeDamage(dtEnvironment, nullptr, GetRawDamageAgainst(*this), GetKnockbackAmountAgainst(*this)); } else { -- cgit v1.2.3