{"action":"created","issue":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/16681","repository_url":"https://api.github.com/repos/TrinityCore/TrinityCore","labels_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/16681/labels{/name}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/16681/comments","events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/16681/events","html_url":"https://github.com/TrinityCore/TrinityCore/issues/16681","id":136538079,"number":16681,"title":"Core/Movement: Desync between top MotionMaster movement and unit movespline","user":{"login":"ccrs","id":4329612,"avatar_url":"https://avatars.githubusercontent.com/u/4329612?v=3","gravatar_id":"","url":"https://api.github.com/users/ccrs","html_url":"https://github.com/ccrs","followers_url":"https://api.github.com/users/ccrs/followers","following_url":"https://api.github.com/users/ccrs/following{/other_user}","gists_url":"https://api.github.com/users/ccrs/gists{/gist_id}","starred_url":"https://api.github.com/users/ccrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccrs/subscriptions","organizations_url":"https://api.github.com/users/ccrs/orgs","repos_url":"https://api.github.com/users/ccrs/repos","events_url":"https://api.github.com/users/ccrs/events{/privacy}","received_events_url":"https://api.github.com/users/ccrs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Comp-Core","name":"Comp-Core","color":"FF6600"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-25T23:00:13Z","updated_at":"2016-02-28T19:15:07Z","closed_at":null,"body":"I've noticed that motion master updates get interrupted on root and stun unitstates, but the unit spline is not. This leads to weird teleport visuals/early movement finish.\r\n\r\nI'll try to get some feedback here before openning a PR.\r\n\r\n````` diff\r\nvoid Unit::UpdateSplineMovement(uint32 t_diff)\r\n{\r\n+    // prevent spline to be updated if motionmaster is not\r\n+    if (HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED))\r\n+       return;\r\n\r\n    if (movespline->Finalized())\r\n        return;\r\n\r\n    movespline->updateState(t_diff);\r\n    bool arrived = movespline->Finalized();\r\n\r\n    if (arrived)\r\n        DisableSpline();\r\n\r\n    m_movesplineTimer.Update(t_diff);\r\n    if (m_movesplineTimer.Passed() || arrived)\r\n        UpdateSplinePosition();\r\n}\r\n````\r\nThis currently does not work, don't really know why though\r\n\r\n85c912c4048287931985c98186423d2bf51fdebb"},"comment":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/comments/189924266","html_url":"https://github.com/TrinityCore/TrinityCore/issues/16681#issuecomment-189924266","issue_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/16681","id":189924266,"user":{"login":"Trisjdc","id":7476368,"avatar_url":"https://avatars.githubusercontent.com/u/7476368?v=3","gravatar_id":"","url":"https://api.github.com/users/Trisjdc","html_url":"https://github.com/Trisjdc","followers_url":"https://api.github.com/users/Trisjdc/followers","following_url":"https://api.github.com/users/Trisjdc/following{/other_user}","gists_url":"https://api.github.com/users/Trisjdc/gists{/gist_id}","starred_url":"https://api.github.com/users/Trisjdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trisjdc/subscriptions","organizations_url":"https://api.github.com/users/Trisjdc/orgs","repos_url":"https://api.github.com/users/Trisjdc/repos","events_url":"https://api.github.com/users/Trisjdc/events{/privacy}","received_events_url":"https://api.github.com/users/Trisjdc/received_events","type":"User","site_admin":false},"created_at":"2016-02-28T19:15:07Z","updated_at":"2016-02-28T19:15:07Z","body":"Movespline is supposed to be already finalized if the unit has UNIT_STATE_ROOT or UNIT_STATE_STUNNED. There's a missing MoveSplineInit::Stop call somewhere."}}