X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2Fui.cpp;h=dd113ca2b620d8fd763934459e9e4b1f088c15ce;hb=0ab149c70b3f984b2cc0c7a122b4aa347bc5fd79;hp=1af9e8722f75cbc60c503b7882b6c187abde12a5;hpb=150d065f431d665326fd8028748c48a74ad956bb;p=blank.git diff --git a/src/ui/ui.cpp b/src/ui/ui.cpp index 1af9e87..dd113ca 100644 --- a/src/ui/ui.cpp +++ b/src/ui/ui.cpp @@ -52,9 +52,8 @@ void PlayerController::SetMovement(const glm::vec3 &m) noexcept { Invalidate(); } -glm::vec3 PlayerController::ControlForce(const EntityState &s) const { - glm::vec3 target(rotateY(move_dir * player.GetEntity().MaxVelocity(), s.yaw) - s.velocity); - return target * player.GetEntity().MaxControlForce(); +glm::vec3 PlayerController::ControlForce(const Entity &e, const EntityState &s) const { + return TargetVelocity(rotateY(move_dir * e.MaxVelocity(), s.yaw), s, 5.0f); } void PlayerController::TurnHead(float dp, float dy) noexcept {