summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/BlockInfo.cpp1
-rw-r--r--src/Entities/ArrowEntity.cpp24
-rw-r--r--src/Entities/Pickup.cpp2
-rw-r--r--src/World.cpp9
-rw-r--r--src/World.h1
5 files changed, 4 insertions, 33 deletions
diff --git a/src/BlockInfo.cpp b/src/BlockInfo.cpp
index 16314290a..9a953e396 100644
--- a/src/BlockInfo.cpp
+++ b/src/BlockInfo.cpp
@@ -365,7 +365,6 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE].m_IsSolid = false;
a_Info[E_BLOCK_MELON_STEM ].m_IsSolid = false;
a_Info[E_BLOCK_NETHER_PORTAL ].m_IsSolid = false;
- a_Info[E_BLOCK_PISTON_EXTENSION ].m_IsSolid = false;
a_Info[E_BLOCK_POTATOES ].m_IsSolid = false;
a_Info[E_BLOCK_POWERED_RAIL ].m_IsSolid = false;
a_Info[E_BLOCK_RAIL ].m_IsSolid = false;
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp
index 47a0876fc..d59088e72 100644
--- a/src/Entities/ArrowEntity.cpp
+++ b/src/Entities/ArrowEntity.cpp
@@ -106,14 +106,7 @@ void cArrowEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos)
a_EntityHit.TakeDamage(dtRangedAttack, this, Damage, 1);
// Broadcast successful hit sound
- m_World->BroadcastSoundEffect(
- "random.successful_hit",
- (int)std::floor(GetPosX() * 8.0),
- (int)std::floor(GetPosY() * 8.0),
- (int)std::floor(GetPosZ() * 8.0),
- 0.5f,
- 0.75f + ((float)((GetUniqueID() * 23) % 32)) / 64.0f
- );
+ GetWorld()->BroadcastSoundEffect("random.successful_hit", (int)GetPosX() * 8, (int)GetPosY() * 8, (int)GetPosZ() * 8, 0.5, (float)(0.75 + ((float)((GetUniqueID() * 23) % 32)) / 64));
Destroy();
}
@@ -136,21 +129,10 @@ void cArrowEntity::CollectedBy(cPlayer * a_Dest)
return;
}
}
-
- // TODO: BroadcastCollectPickup needs a cPickup, which we don't have
- // m_World->BroadcastCollectPickup(*this, *a_Dest);
+ GetWorld()->BroadcastCollectEntity(*this, *a_Dest);
+ GetWorld()->BroadcastSoundEffect("random.pop", (int)GetPosX() * 8, (int)GetPosY() * 8, (int)GetPosZ() * 8, 0.5, (float)(0.75 + ((float)((GetUniqueID() * 23) % 32)) / 64));
m_bIsCollected = true;
-
- cFastRandom Random;
- m_World->BroadcastSoundEffect(
- "random.pop",
- (int)std::floor(GetPosX() * 8.0),
- (int)std::floor(GetPosY() * 8),
- (int)std::floor(GetPosZ() * 8),
- 0.2F,
- ((Random.NextFloat(1.0F) - Random.NextFloat(1.0F)) * 0.7F + 1.0F) * 2.0F
- );
}
}
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index 10b6bbd5c..24fa591da 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -224,7 +224,7 @@ bool cPickup::CollectedBy(cPlayer * a_Dest)
}
m_Item.m_ItemCount -= NumAdded;
- m_World->BroadcastCollectPickup(*this, *a_Dest);
+ m_World->BroadcastCollectEntity(*this, *a_Dest);
// Also send the "pop" sound effect with a somewhat random pitch (fast-random using EntityID ;)
m_World->BroadcastSoundEffect("random.pop",(int)GetPosX() * 8, (int)GetPosY() * 8, (int)GetPosZ() * 8, 0.5, (float)(0.75 + ((float)((GetUniqueID() * 23) % 32)) / 64));
if (m_Item.m_ItemCount <= 0)
diff --git a/src/World.cpp b/src/World.cpp
index 48c3448a3..a6607de12 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -1886,15 +1886,6 @@ void cWorld::BroadcastCollectEntity(const cEntity & a_Entity, const cPlayer & a_
-void cWorld::BroadcastCollectPickup(const cPickup & a_Pickup, const cPlayer & a_Player, const cClientHandle * a_Exclude)
-{
- m_ChunkMap->BroadcastCollectEntity(a_Pickup, a_Player, a_Exclude);
-}
-
-
-
-
-
void cWorld::BroadcastDestroyEntity(const cEntity & a_Entity, const cClientHandle * a_Exclude)
{
m_ChunkMap->BroadcastDestroyEntity(a_Entity, a_Exclude);
diff --git a/src/World.h b/src/World.h
index 32e64c8e0..476a49739 100644
--- a/src/World.h
+++ b/src/World.h
@@ -207,7 +207,6 @@ public:
void BroadcastChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer, const cClientHandle * a_Exclude = NULL);
void BroadcastCollectEntity (const cEntity & a_Pickup, const cPlayer & a_Player, const cClientHandle * a_Exclude = NULL);
- void BroadcastCollectPickup (const cPickup & a_Pickup, const cPlayer & a_Player, const cClientHandle * a_Exclude = NULL);
void BroadcastDestroyEntity (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
void BroadcastEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration, const cClientHandle * a_Exclude = NULL);
void BroadcastEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item, const cClientHandle * a_Exclude = NULL);