diff options
author | Jaume Aloy <hircine45@gmail.com> | 2014-08-21 12:08:38 +0200 |
---|---|---|
committer | Jaume Aloy <hircine45@gmail.com> | 2014-08-21 12:08:38 +0200 |
commit | 19d1c976e7cd7f6c8a4cb3540d5512a035a4162a (patch) | |
tree | e014b26ee9a2bfd15d31552338e9225777a48b81 /src/Entities/ArrowEntity.cpp | |
parent | Changed if in BlockHandler (diff) | |
download | cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar.gz cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar.bz2 cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar.lz cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar.xz cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar.zst cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.zip |
Diffstat (limited to 'src/Entities/ArrowEntity.cpp')
-rw-r--r-- | src/Entities/ArrowEntity.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp index 12149b297..c3e7c5d79 100644 --- a/src/Entities/ArrowEntity.cpp +++ b/src/Entities/ArrowEntity.cpp @@ -91,7 +91,7 @@ void cArrowEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFa // Broadcast arrow hit sound m_World->BroadcastSoundEffect("random.bowhit", (double)X, (double)Y, (double)Z, 0.5f, (float)(0.75 + ((float)((GetUniqueID() * 23) % 32)) / 64)); - if ((m_World->GetBlock(Hit) == E_BLOCK_TNT) && (IsOnFire())) + if ((m_World->GetBlock(Hit) == E_BLOCK_TNT) && IsOnFire()) { m_World->SetBlock(X, Y, Z, E_BLOCK_AIR, 0); m_World->SpawnPrimedTNT(X, Y, Z); @@ -122,12 +122,12 @@ void cArrowEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) int PunchLevel = m_CreatorData.m_Enchantments.GetLevel(cEnchantments::enchPunch); if (PunchLevel > 0) { - Vector3f LookVector = Vector3d(0, 0, 0); + Vector3d LookVector = GetLookVector(); Vector3f FinalSpeed = Vector3f(0, 0, 0); switch (PunchLevel) { - case 1: FinalSpeed = LookVector * Vector3d(5, 0.3, 5); - case 2: FinalSpeed = LookVector * Vector3d(8, 0.3, 8); + case 1: FinalSpeed = LookVector * Vector3d(5, 0.3, 5); break; + case 2: FinalSpeed = LookVector * Vector3d(8, 0.3, 8); break; default: break; } a_EntityHit.SetSpeed(FinalSpeed); @@ -135,7 +135,7 @@ void cArrowEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) a_EntityHit.TakeDamage(dtRangedAttack, this, Damage, KnockbackAmount); - if ((IsOnFire() && !a_EntityHit.IsSubmerged() && !a_EntityHit.IsSwimming())) + if (IsOnFire() && !a_EntityHit.IsSubmerged() && !a_EntityHit.IsSwimming()) { a_EntityHit.StartBurning(100); } |