summaryrefslogtreecommitdiffstats
path: root/source/Entities/Entity.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-09-17 11:28:09 +0200
committerAlexander Harkness <bearbin@gmail.com>2013-09-17 11:28:09 +0200
commit59cf62f26825f245f885ad60dd8a453406961cc7 (patch)
treeefceb52f95a13d18229ad018da56f3155d161cbc /source/Entities/Entity.cpp
parentAPIDump: Additional information is linkified, too. (diff)
parentFixed derpy comparison (diff)
downloadcuberite-59cf62f26825f245f885ad60dd8a453406961cc7.tar
cuberite-59cf62f26825f245f885ad60dd8a453406961cc7.tar.gz
cuberite-59cf62f26825f245f885ad60dd8a453406961cc7.tar.bz2
cuberite-59cf62f26825f245f885ad60dd8a453406961cc7.tar.lz
cuberite-59cf62f26825f245f885ad60dd8a453406961cc7.tar.xz
cuberite-59cf62f26825f245f885ad60dd8a453406961cc7.tar.zst
cuberite-59cf62f26825f245f885ad60dd8a453406961cc7.zip
Diffstat (limited to 'source/Entities/Entity.cpp')
-rw-r--r--source/Entities/Entity.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/Entities/Entity.cpp b/source/Entities/Entity.cpp
index d9272b39d..dc3c7796e 100644
--- a/source/Entities/Entity.cpp
+++ b/source/Entities/Entity.cpp
@@ -651,21 +651,21 @@ void cEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
}
}
}
- else
+ }
+ else
+ {
+ // Friction for non-minecarts
+ if (NextSpeed.SqrLength() > 0.0004f)
{
- // Friction
- if (NextSpeed.SqrLength() > 0.0004f)
+ NextSpeed.x *= 0.7f / (1 + a_Dt);
+ if (fabs(NextSpeed.x) < 0.05)
{
- NextSpeed.x *= 0.7f / (1 + a_Dt);
- if (fabs(NextSpeed.x) < 0.05)
- {
- NextSpeed.x = 0;
- }
- NextSpeed.z *= 0.7f / (1 + a_Dt);
- if (fabs(NextSpeed.z) < 0.05)
- {
- NextSpeed.z = 0;
- }
+ NextSpeed.x = 0;
+ }
+ NextSpeed.z *= 0.7f / (1 + a_Dt);
+ if (fabs(NextSpeed.z) < 0.05)
+ {
+ NextSpeed.z = 0;
}
}
}