1
0

Fixed arrow collection animation

* Fixed piston extension non-solidness
This commit is contained in:
Tiger Wang 2014-07-09 19:56:50 +01:00
parent 372dbbb994
commit 74b6b398e7
5 changed files with 4 additions and 33 deletions

View File

@ -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;

View File

@ -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
);
}
}

View File

@ -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)

View File

@ -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);

View File

@ -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);