diff options
Diffstat (limited to '')
-rw-r--r-- | src/Entities/EnderCrystal.cpp | 6 | ||||
-rw-r--r-- | src/Entities/Entity.cpp | 4 | ||||
-rw-r--r-- | src/Entities/Pickup.cpp | 5 | ||||
-rw-r--r-- | src/Entities/Pickup.h | 2 | ||||
-rw-r--r-- | src/Entities/ProjectileEntity.cpp | 6 |
5 files changed, 14 insertions, 9 deletions
diff --git a/src/Entities/EnderCrystal.cpp b/src/Entities/EnderCrystal.cpp index c356caa70..d39da5a74 100644 --- a/src/Entities/EnderCrystal.cpp +++ b/src/Entities/EnderCrystal.cpp @@ -45,7 +45,11 @@ void cEnderCrystal::SetShowBottom(bool a_ShowBottom) void cEnderCrystal::SetBeamTarget(Vector3i a_BeamTarget) { m_BeamTarget = a_BeamTarget; - m_World->BroadcastEntityMetadata(*this); + + if (m_DisplayBeam) + { + m_World->BroadcastEntityMetadata(*this); + } } diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 0718da06c..59930a4f1 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -11,7 +11,7 @@ #include "../Chunk.h" #include "../Simulator/FluidSimulator.h" #include "../Bindings/PluginManager.h" -#include "../LineBlockTracer.h" +#include "../Physics/Tracers/LineBlockTracer.h" #include "../Items/ItemHandler.h" #include "../FastRandom.h" #include "../NetherPortalScanner.h" @@ -1157,7 +1157,7 @@ void cEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) Vector3i HitBlockCoords; eBlockFace HitBlockFace; Vector3d wantNextPos = NextPos + NextSpeed * DtSec.count(); - auto isHit = cLineBlockTracer::FirstSolidHitTrace(*GetWorld(), NextPos, wantNextPos, HitCoords, HitBlockCoords, HitBlockFace); + auto isHit = LineBlockTracer::FirstSolidHitTrace(*GetWorld(), NextPos, wantNextPos, HitCoords, HitBlockCoords, HitBlockFace); if (isHit) { // Set our position to where the block was hit: diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp index 699bd5944..9c5bcc6b8 100644 --- a/src/Entities/Pickup.cpp +++ b/src/Entities/Pickup.cpp @@ -116,12 +116,13 @@ private: //////////////////////////////////////////////////////////////////////////////// // cPickup: -cPickup::cPickup(Vector3d a_Position, cItem && a_Item, Vector3d a_Speed, cTickTime a_CollectionDelay, cTickTime a_Lifetime) : +cPickup::cPickup(Vector3d a_Position, cItem && a_Item, Vector3d a_Speed, cTickTime a_CollectionDelay, cTickTime a_Lifetime, bool a_CanCombine) : Super(etPickup, a_Position, 0.25f, 0.25f), m_Item(std::move(a_Item)), m_RemainingCollectionDelay(a_CollectionDelay), m_RemainingLifetime(a_Lifetime), - m_IsCollected(false) + m_IsCollected(false), + m_IsCombinable(a_CanCombine) { SetGravity(-16.0f); SetAirDrag(0.02f); diff --git a/src/Entities/Pickup.h b/src/Entities/Pickup.h index b03ae0846..e8184e8af 100644 --- a/src/Entities/Pickup.h +++ b/src/Entities/Pickup.h @@ -26,7 +26,7 @@ public: // tolua_export CLASS_PROTODEF(cPickup) - cPickup(Vector3d a_Position, cItem && a_Item, Vector3d a_Speed, cTickTime a_CollectionDelay, cTickTime a_Lifetime); + cPickup(Vector3d a_Position, cItem && a_Item, Vector3d a_Speed, cTickTime a_CollectionDelay, cTickTime a_Lifetime, bool a_CanCombine); cItem & GetItem(void) {return m_Item; } // tolua_export const cItem & GetItem(void) const {return m_Item; } diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp index ea59c9c46..03c9c72d8 100644 --- a/src/Entities/ProjectileEntity.cpp +++ b/src/Entities/ProjectileEntity.cpp @@ -9,7 +9,7 @@ #include "ProjectileEntity.h" #include "../BlockInfo.h" #include "../ClientHandle.h" -#include "../LineBlockTracer.h" +#include "../Physics/Tracers/LineBlockTracer.h" #include "../BoundingBox.h" #include "../ChunkMap.h" #include "../Chunk.h" @@ -34,7 +34,7 @@ // cProjectileTracerCallback: class cProjectileTracerCallback : - public cBlockTracer::cCallbacks + public BlockTracerCallbacks { public: cProjectileTracerCallback(cProjectileEntity * a_Projectile) : @@ -411,7 +411,7 @@ void cProjectileEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a // Trace the tick's worth of movement as a line: cProjectileTracerCallback TracerCallback(this); - if (!cLineBlockTracer::Trace(*m_World, TracerCallback, Pos, NextPos)) + if (!LineBlockTracer::Trace(*m_World, TracerCallback, Pos, NextPos)) { // Something has been hit, abort all other processing return; |