summaryrefslogtreecommitdiffstats
path: root/source/Pickup.cpp
diff options
context:
space:
mode:
authorkeyboard.osh@gmail.com <keyboard.osh@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-23 05:33:47 +0100
committerkeyboard.osh@gmail.com <keyboard.osh@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-23 05:33:47 +0100
commitb32a60106f78971da034a457cd091c7e69c5aec8 (patch)
tree1fb5812b28db43b28e1d42c455502665008d8efa /source/Pickup.cpp
parentRe-tweaked WormNestCaves for more reasonable cave sizes (diff)
downloadcuberite-b32a60106f78971da034a457cd091c7e69c5aec8.tar
cuberite-b32a60106f78971da034a457cd091c7e69c5aec8.tar.gz
cuberite-b32a60106f78971da034a457cd091c7e69c5aec8.tar.bz2
cuberite-b32a60106f78971da034a457cd091c7e69c5aec8.tar.lz
cuberite-b32a60106f78971da034a457cd091c7e69c5aec8.tar.xz
cuberite-b32a60106f78971da034a457cd091c7e69c5aec8.tar.zst
cuberite-b32a60106f78971da034a457cd091c7e69c5aec8.zip
Diffstat (limited to '')
-rw-r--r--source/Pickup.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/Pickup.cpp b/source/Pickup.cpp
index 5775782f5..16e68b3ee 100644
--- a/source/Pickup.cpp
+++ b/source/Pickup.cpp
@@ -129,7 +129,7 @@ void cPickup::HandlePhysics(float a_Dt)
if( BlockIn != E_BLOCK_AIR && !IsBlockWater(BlockIn) ) // If in ground itself, push it out
{
m_bOnGround = true;
- SetPosY(GetPosY() + 0.2);
+ AddPosY(0.2);
m_bReplicated = false;
}
SetSpeedX(GetSpeedX() * 0.7f/(1+a_Dt));
@@ -176,7 +176,7 @@ void cPickup::HandlePhysics(float a_Dt)
{
Gravity = -3;
}
- SetSpeedY(GetSpeedY() + Gravity);
+ AddSpeedY(Gravity);
// Set to hit position
m_ResultingSpeed += GetSpeed();
@@ -209,15 +209,15 @@ void cPickup::HandlePhysics(float a_Dt)
}
}
SetPosition(Tracer.RealHit);
- SetPosition(GetPosition() + (Tracer.HitNormal * 0.2f));
+ AddPosition(Tracer.HitNormal * 0.2f);
}
else
- SetPosition(GetPosition() + (m_ResultingSpeed*a_Dt));
+ AddPosition(m_ResultingSpeed*a_Dt);
}
else
{ // We didn't hit anything, so move =]
- SetPosition(GetPosition() + (m_ResultingSpeed*a_Dt));
+ AddPosition(m_ResultingSpeed*a_Dt);
}
}
// Usable for debugging