summaryrefslogtreecommitdiffstats
path: root/source/Entities
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-13 00:31:26 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-13 00:31:26 +0200
commita39564a46aee5a34157733decb8ef79cd110e82d (patch)
treeb5fc558524f2a8e6979bfff04bdbcad5ae781cbe /source/Entities
parentImplemented xoft's suggestions again (diff)
downloadcuberite-a39564a46aee5a34157733decb8ef79cd110e82d.tar
cuberite-a39564a46aee5a34157733decb8ef79cd110e82d.tar.gz
cuberite-a39564a46aee5a34157733decb8ef79cd110e82d.tar.bz2
cuberite-a39564a46aee5a34157733decb8ef79cd110e82d.tar.lz
cuberite-a39564a46aee5a34157733decb8ef79cd110e82d.tar.xz
cuberite-a39564a46aee5a34157733decb8ef79cd110e82d.tar.zst
cuberite-a39564a46aee5a34157733decb8ef79cd110e82d.zip
Diffstat (limited to 'source/Entities')
-rw-r--r--source/Entities/Entity.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/Entities/Entity.cpp b/source/Entities/Entity.cpp
index 4d7206965..2443b1810 100644
--- a/source/Entities/Entity.cpp
+++ b/source/Entities/Entity.cpp
@@ -607,19 +607,19 @@ void cEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
switch(WaterDir)
{
case X_PLUS:
- m_WaterSpeed.x = 1.f;
+ m_WaterSpeed.x = 0.2f;
m_bOnGround = false;
break;
case X_MINUS:
- m_WaterSpeed.x = -1.f;
+ m_WaterSpeed.x = -0.2f;
m_bOnGround = false;
break;
case Z_PLUS:
- m_WaterSpeed.z = 1.f;
+ m_WaterSpeed.z = 0.2f;
m_bOnGround = false;
break;
case Z_MINUS:
- m_WaterSpeed.z = -1.f;
+ m_WaterSpeed.z = -0.2f;
m_bOnGround = false;
break;
@@ -650,7 +650,6 @@ void cEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
{
if( Ret == 1 )
{
-
if( Tracer.HitNormal.x != 0.f ) NextSpeed.x = 0.f;
if( Tracer.HitNormal.y != 0.f ) NextSpeed.y = 0.f;
if( Tracer.HitNormal.z != 0.f ) NextSpeed.z = 0.f;
@@ -666,7 +665,9 @@ void cEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
NextPos.z += Tracer.HitNormal.z * 0.3f;
}
else
+ {
NextPos += (NextSpeed * a_Dt);
+ }
}
else
{