summaryrefslogtreecommitdiffstats
path: root/src/Entities/ExpOrb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities/ExpOrb.cpp')
-rw-r--r--src/Entities/ExpOrb.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Entities/ExpOrb.cpp b/src/Entities/ExpOrb.cpp
index 3623c869a..73d5cbfed 100644
--- a/src/Entities/ExpOrb.cpp
+++ b/src/Entities/ExpOrb.cpp
@@ -6,7 +6,7 @@
cExpOrb::cExpOrb(double a_X, double a_Y, double a_Z, int a_Reward)
- : cEntity(etExpOrb, a_X, a_Y, a_Z, 0.98, 0.98)
+ : cEntity(etExpOrb, a_X, a_Y, a_Z, 0.98, 0.98)
, m_Reward(a_Reward)
, m_Timer(0.f)
{
@@ -19,7 +19,7 @@ cExpOrb::cExpOrb(double a_X, double a_Y, double a_Z, int a_Reward)
cExpOrb::cExpOrb(const Vector3d & a_Pos, int a_Reward)
- : cEntity(etExpOrb, a_Pos.x, a_Pos.y, a_Pos.z, 0.98, 0.98)
+ : cEntity(etExpOrb, a_Pos.x, a_Pos.y, a_Pos.z, 0.98, 0.98)
, m_Reward(a_Reward)
, m_Timer(0.f)
{
@@ -34,8 +34,6 @@ cExpOrb::cExpOrb(const Vector3d & a_Pos, int a_Reward)
void cExpOrb::SpawnOn(cClientHandle & a_Client)
{
a_Client.SendExperienceOrb(*this);
- m_bDirtyPosition = false;
- m_bDirtySpeed = false;
m_bDirtyOrientation = false;
m_bDirtyHead = false;
}
@@ -58,15 +56,15 @@ void cExpOrb::Tick(float a_Dt, cChunk & a_Chunk)
LOGD("Player %s picked up an ExpOrb. His reward is %i", a_ClosestPlayer->GetName().c_str(), m_Reward);
a_ClosestPlayer->DeltaExperience(m_Reward);
- m_World->BroadcastSoundEffect("random.orb", (int)(GetPosX() * 8), (int)(GetPosY() * 8), (int)(GetPosZ() * 8), 0.5f, (float)(0.75 + ((float)((GetUniqueID() * 23) % 32)) / 64));
+ m_World->BroadcastSoundEffect("random.orb", GetPosX(), GetPosY(), GetPosZ(), 0.5f, (float)(0.75 + ((float)((GetUniqueID() * 23) % 32)) / 64));
Destroy();
}
a_Distance.Normalize();
a_Distance *= ((float) (5.5 - Distance));
- SetSpeedX( a_Distance.x );
- SetSpeedY( a_Distance.y );
- SetSpeedZ( a_Distance.z );
+ SetSpeedX( a_Distance.x);
+ SetSpeedY( a_Distance.y);
+ SetSpeedZ( a_Distance.z);
BroadcastMovementUpdate();
}
HandlePhysics(a_Dt, a_Chunk);