summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authorDevToaster <blazetoaster@gmail.com>2015-03-31 17:03:35 +0200
committerDevToaster <blazetoaster@gmail.com>2015-03-31 17:03:35 +0200
commit45c84ea93318a4ab8921a20d7d2c086cfc313999 (patch)
tree2e802814ec3da8fa341e9ad73a588f01fd4b5e2d /src/Entities/ProjectileEntity.cpp
parentAdjusted projectile physics (diff)
downloadcuberite-45c84ea93318a4ab8921a20d7d2c086cfc313999.tar
cuberite-45c84ea93318a4ab8921a20d7d2c086cfc313999.tar.gz
cuberite-45c84ea93318a4ab8921a20d7d2c086cfc313999.tar.bz2
cuberite-45c84ea93318a4ab8921a20d7d2c086cfc313999.tar.lz
cuberite-45c84ea93318a4ab8921a20d7d2c086cfc313999.tar.xz
cuberite-45c84ea93318a4ab8921a20d7d2c086cfc313999.tar.zst
cuberite-45c84ea93318a4ab8921a20d7d2c086cfc313999.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/ProjectileEntity.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index 28f7d0dea..05b7669cd 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -228,7 +228,7 @@ cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, double a
m_IsInGround(false)
{
SetGravity(-12.0f);
- SetAirDrag(0.2f);
+ SetAirDrag(0.01f);
}
@@ -245,7 +245,7 @@ cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, const Ve
SetYawFromSpeed();
SetPitchFromSpeed();
SetGravity(-12.0f);
- SetAirDrag(0.2f);
+ SetAirDrag(0.01f);
}
@@ -395,7 +395,7 @@ void cProjectileEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a
// Add slowdown and gravity effect to the speed:
Vector3d NewSpeed(GetSpeed());
NewSpeed.y += m_Gravity * DtSec.count();
- NewSpeed -= NewSpeed * m_AirDrag * DtSec.count();
+ NewSpeed -= NewSpeed * (m_AirDrag * 20.0f) * DtSec.count();
SetSpeed(NewSpeed);
SetYawFromSpeed();
SetPitchFromSpeed();