void Move(float xMoving, float zMoving, float factor, Vector3 drag, float gravity, float yMul) { entity.Velocity.Y *= yMul; if (!hacks.Noclip) { collisions.MoveAndWallSlide(); } entity.Position += entity.Velocity; entity.Velocity.Y /= yMul; entity.Velocity = Utils.Mul(entity.Velocity, drag); entity.Velocity.Y -= gravity; }
void Move(Vector3 drag, float gravity, float yMul) { entity.Velocity.Y *= yMul; entity.OldPosition = entity.Position; if (!hacks.Noclip) { collisions.MoveAndWallSlide(); } entity.Position += entity.Velocity; if (entity.OldPosition.Y > entity.Position.Y) { entity.fallDistance += (entity.OldPosition.Y - entity.Position.Y); } entity.Velocity.Y /= yMul; entity.Velocity = Utils.Mul(entity.Velocity, drag); entity.Velocity.Y -= gravity; }