Bundled fixes [SEE DESC]

* BoundingBox now returns FACE_NONE
+ Arrows can be picked up
* Arrows dug up resume physics simulations
* Added sound effects for bows, lava to stone, and arrows
* Fixed SoundParticleEffect on <1.7 protocols
This commit is contained in:
Tiger Wang
2013-11-12 21:43:20 +00:00
parent f713780db3
commit 347162a82f
9 changed files with 147 additions and 25 deletions
+15 -1
View File
@@ -53,6 +53,9 @@ public:
/// Called by the physics blocktracer when the entity hits another entity
virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) {}
/// Called by Chunk when the projectile is eligible for player collection
virtual void CollectedBy(cPlayer * a_Dest);
// tolua_begin
/// Returns the kind of the projectile (fast class identification)
@@ -80,7 +83,7 @@ protected:
/// True if the projectile has hit the ground and is stuck there
bool m_IsInGround;
// cEntity overrides:
virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
virtual void HandlePhysics(float a_Dt, cChunk & a_Chunk) override;
@@ -153,9 +156,20 @@ protected:
/// If true, the arrow deals more damage
bool m_IsCritical;
/// Timer for pickup collection animation or five minute timeout
float m_Timer;
/// If true, the arrow is in the process of being collected - don't go to anyone else
bool m_bIsCollected;
/// Stores the block position that arrow is lodged into, sets m_IsInGround to false if it becomes air
Vector3i m_HitBlockPos;
// cProjectileEntity overrides:
virtual void OnHitSolidBlock(const Vector3d & a_HitPos, char a_HitFace) override;
virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) override;
virtual void CollectedBy(cPlayer * a_Player) override;
virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
// tolua_begin
} ;