summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGargaj <gargaj@conspiracy.hu>2015-11-10 14:00:27 +0100
committerGargaj <gargaj@conspiracy.hu>2015-11-10 18:00:14 +0100
commit67e6da4627dc2e82defd03cb6db7be92bbdb9e61 (patch)
tree64adf6046d78c0be7a4e5f04853303de37201359 /src
parentMerge pull request #2633 from cuberite/IncludeBrewingRecipes (diff)
downloadcuberite-67e6da4627dc2e82defd03cb6db7be92bbdb9e61.tar
cuberite-67e6da4627dc2e82defd03cb6db7be92bbdb9e61.tar.gz
cuberite-67e6da4627dc2e82defd03cb6db7be92bbdb9e61.tar.bz2
cuberite-67e6da4627dc2e82defd03cb6db7be92bbdb9e61.tar.lz
cuberite-67e6da4627dc2e82defd03cb6db7be92bbdb9e61.tar.xz
cuberite-67e6da4627dc2e82defd03cb6db7be92bbdb9e61.tar.zst
cuberite-67e6da4627dc2e82defd03cb6db7be92bbdb9e61.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Pawn.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp
index 5ca0c6126..ca2d413df 100644
--- a/src/Entities/Pawn.cpp
+++ b/src/Entities/Pawn.cpp
@@ -70,7 +70,7 @@ void cPawn::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
Vector3d v3Delta = a_Entity->GetPosition() - m_Pusher->GetPosition();
v3Delta.y = 0.0; // we only push sideways
- v3Delta *= 1.0 / v3Delta.Length(); // we push harder if we're close
+ v3Delta *= 1.0 / (v3Delta.Length() + 0.01); // we push harder if we're close
// QUESTION: is there an additional multiplier for this? current shoving seems a bit weak
a_Entity->AddSpeed(v3Delta);