Permalink
Browse files

Fix being pushed after being /tp ed to by someone (Thanks goodlyay)

  • Loading branch information...
UnknownShadow200 committed Nov 29, 2017
1 parent 71a2171 commit 91a3ff21b5bda8f21c180b74b9f8bfa6bcdc133c
Showing with 1 addition and 1 deletion.
  1. +1 −1 ClassicalSharp/Entities/Components/PhysicsComponent.cs
@@ -299,7 +299,7 @@ public sealed class PhysicsComponent {
float dX = other.Position.X - entity.Position.X;
float dZ = other.Position.Z - entity.Position.Z;
float dist = dX * dX + dZ * dZ;
if (dist < 0.0001f || dist > 1f) continue; // TODO: range needs to be lower?
if (dist < 0.002f || dist > 1f) continue; // TODO: range needs to be lower?
Vector3 dir = Vector3.Normalize(dX, 0, dZ);
entity.Velocity -= dir * (1 - dist) / 32f; // TODO: should be 24/25

0 comments on commit 91a3ff2

Please sign in to comment.