{"action":"created","comment":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments/79355096","id":79355096,"diff_hunk":"@@ -468,6 +470,29 @@ void MotionMaster::MoveSmoothPath(uint32 pointId, Movement::PointsArray const& p\n     //MovePoint(EVENT_CHARGE_PREPATH, pos, false);\n }\n \n+void MotionMaster::MoveAlongSplineChain(uint32 pointId, uint32 dbChainId, bool walk)\n+{\n+    Creature* owner = _owner->ToCreature();\n+    ASSERT(owner && \"MoveAlongSplineChain (w/ chain from DB) may only be called on creatures!\");\n+    SplineChain const& chain = sScriptSystemMgr->GetSplineChain(owner, dbChainId);\n+    if (chain.empty())\n+    {\n+        TC_LOG_ERROR(\"misc\", \"MotionMaster::MoveAlongSplineChain: creature with entry %u tried to walk along non-existing spline chain with DB id %u.\", owner->GetEntry(), dbChainId);\n+        return;\n+    }\n+    MoveAlongSplineChain(pointId, chain, walk);\n+}\n+\n+void MotionMaster::MoveAlongSplineChain(uint32 pointId, SplineChain const& chain, bool walk)\n+{\n+    Mutate(new SplineChainMovementGenerator(pointId, chain, walk), MOTION_SLOT_CONTROLLED);","path":"src/server/game/Movement/MotionMaster.cpp","position":35,"original_position":35,"commit_id":"0ebe61a42f30d9fc32d8b889697a70c40cb09471","original_commit_id":"0ebe61a42f30d9fc32d8b889697a70c40cb09471","user":{"login":"Treeston","id":14020072,"avatar_url":"https://avatars.githubusercontent.com/u/14020072?v=3","gravatar_id":"","url":"https://api.github.com/users/Treeston","html_url":"https://github.com/Treeston","followers_url":"https://api.github.com/users/Treeston/followers","following_url":"https://api.github.com/users/Treeston/following{/other_user}","gists_url":"https://api.github.com/users/Treeston/gists{/gist_id}","starred_url":"https://api.github.com/users/Treeston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Treeston/subscriptions","organizations_url":"https://api.github.com/users/Treeston/orgs","repos_url":"https://api.github.com/users/Treeston/repos","events_url":"https://api.github.com/users/Treeston/events{/privacy}","received_events_url":"https://api.github.com/users/Treeston/received_events","type":"User","site_admin":false},"body":"guess it should really be IDLE","created_at":"2016-09-19T09:32:36Z","updated_at":"2016-09-19T09:32:36Z","html_url":"https://github.com/TrinityCore/TrinityCore/pull/17946#discussion_r79355096","pull_request_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17946","_links":{"self":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments/79355096"},"html":{"href":"https://github.com/TrinityCore/TrinityCore/pull/17946#discussion_r79355096"},"pull_request":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17946"}}},"pull_request":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17946","id":85334421,"html_url":"https://github.com/TrinityCore/TrinityCore/pull/17946","diff_url":"https://github.com/TrinityCore/TrinityCore/pull/17946.diff","patch_url":"https://github.com/TrinityCore/TrinityCore/pull/17946.patch","issue_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17946","number":17946,"state":"open","locked":false,"title":"[3.3.5] SplineChain movement generation","user":{"login":"Treeston","id":14020072,"avatar_url":"https://avatars.githubusercontent.com/u/14020072?v=3","gravatar_id":"","url":"https://api.github.com/users/Treeston","html_url":"https://github.com/Treeston","followers_url":"https://api.github.com/users/Treeston/followers","following_url":"https://api.github.com/users/Treeston/following{/other_user}","gists_url":"https://api.github.com/users/Treeston/gists{/gist_id}","starred_url":"https://api.github.com/users/Treeston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Treeston/subscriptions","organizations_url":"https://api.github.com/users/Treeston/orgs","repos_url":"https://api.github.com/users/Treeston/repos","events_url":"https://api.github.com/users/Treeston/events{/privacy}","received_events_url":"https://api.github.com/users/Treeston/received_events","type":"User","site_admin":false},"body":"So, there's a pretty significant difference between waypoint movement on TC and waypoint movement on retail. That much doesn't come as a surprise.\r\n\r\nThe first approximation we came up with was the waypoint motion scheme, where creatures simply move from one point to the next, with interpolation between them provided by mmaps. This was alright enough for general gameplay, but didn't really provide a smooth feeling for pre-composed sequences or RP events.\r\n\r\nThe second approximation that I've started recently using in the Stratholme PR (#17860) is what I call \"spline shortcutting\". Allow me to explain using MS paint:\r\n![Image](http://i.imgur.com/z3RbOfv.png)\r\nThe layout at the top is what the retail servers send for pre-scripted RP sequences, with each color representing a different movespline (new SMSG_ON_MONSTER_MOVE packet), all of them with smoothing flag set which makes the client seamlessly transition between them, providing fluent movement.\r\nThe red spline at the bottom is what smooth pathing in the Stratholme PR currently sends, produced by \"shortcutting\" the splines, inserting artificial waypoints where a new spline begins and creating one single long movespline that is then dumped to the client.\r\nThis works decently well, but there is still some minor stuttering and moonwalking with this at the transition points.\r\n\r\nThe question remains: Can we do better at replicating retail movement?\r\n\r\nIn this PR, I'm trying to answer that to the affirmative. The new SplineChainMovementGenerator takes a set of movespline waypoints along with timings for when to override them with the subsequent spline, all of which can easily be parsed from packet sniffs. This is obviously not dynamic generation, but for a static sequence of events, it really doesn't need to be.\r\n\r\nAlso included is a debug instance that lets you view the new movement generation in action - build the PR branch (will require cmake re-run), then `.go creature id 27891` and perform any emote targeting him to start movement.","created_at":"2016-09-15T01:49:18Z","updated_at":"2016-09-19T09:32:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e57199234f9a2c63b37c72ff2c018bda2c7adfc","assignee":{"login":"Treeston","id":14020072,"avatar_url":"https://avatars.githubusercontent.com/u/14020072?v=3","gravatar_id":"","url":"https://api.github.com/users/Treeston","html_url":"https://github.com/Treeston","followers_url":"https://api.github.com/users/Treeston/followers","following_url":"https://api.github.com/users/Treeston/following{/other_user}","gists_url":"https://api.github.com/users/Treeston/gists{/gist_id}","starred_url":"https://api.github.com/users/Treeston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Treeston/subscriptions","organizations_url":"https://api.github.com/users/Treeston/orgs","repos_url":"https://api.github.com/users/Treeston/repos","events_url":"https://api.github.com/users/Treeston/events{/privacy}","received_events_url":"https://api.github.com/users/Treeston/received_events","type":"User","site_admin":false},"assignees":[{"login":"Treeston","id":14020072,"avatar_url":"https://avatars.githubusercontent.com/u/14020072?v=3","gravatar_id":"","url":"https://api.github.com/users/Treeston","html_url":"https://github.com/Treeston","followers_url":"https://api.github.com/users/Treeston/followers","following_url":"https://api.github.com/users/Treeston/following{/other_user}","gists_url":"https://api.github.com/users/Treeston/gists{/gist_id}","starred_url":"https://api.github.com/users/Treeston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Treeston/subscriptions","organizations_url":"https://api.github.com/users/Treeston/orgs","repos_url":"https://api.github.com/users/Treeston/repos","events_url":"https://api.github.com/users/Treeston/events{/privacy}","received_events_url":"https://api.github.com/users/Treeston/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17946/commits","review_comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17946/comments","review_comment_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17946/comments","statuses_url":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/0ebe61a42f30d9fc32d8b889697a70c40cb09471","head":{"label":"Treeston:3.3.5-splinechains","ref":"3.3.5-splinechains","sha":"0ebe61a42f30d9fc32d8b889697a70c40cb09471","user":{"login":"Treeston","id":14020072,"avatar_url":"https://avatars.githubusercontent.com/u/14020072?v=3","gravatar_id":"","url":"https://api.github.com/users/Treeston","html_url":"https://github.com/Treeston","followers_url":"https://api.github.com/users/Treeston/followers","following_url":"https://api.github.com/users/Treeston/following{/other_user}","gists_url":"https://api.github.com/users/Treeston/gists{/gist_id}","starred_url":"https://api.github.com/users/Treeston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Treeston/subscriptions","organizations_url":"https://api.github.com/users/Treeston/orgs","repos_url":"https://api.github.com/users/Treeston/repos","events_url":"https://api.github.com/users/Treeston/events{/privacy}","received_events_url":"https://api.github.com/users/Treeston/received_events","type":"User","site_admin":false},"repo":{"id":42188757,"name":"TrinityCore","full_name":"Treeston/TrinityCore","owner":{"login":"Treeston","id":14020072,"avatar_url":"https://avatars.githubusercontent.com/u/14020072?v=3","gravatar_id":"","url":"https://api.github.com/users/Treeston","html_url":"https://github.com/Treeston","followers_url":"https://api.github.com/users/Treeston/followers","following_url":"https://api.github.com/users/Treeston/following{/other_user}","gists_url":"https://api.github.com/users/Treeston/gists{/gist_id}","starred_url":"https://api.github.com/users/Treeston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Treeston/subscriptions","organizations_url":"https://api.github.com/users/Treeston/orgs","repos_url":"https://api.github.com/users/Treeston/repos","events_url":"https://api.github.com/users/Treeston/events{/privacy}","received_events_url":"https://api.github.com/users/Treeston/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Treeston/TrinityCore","description":"TrinityCore Open Source MMO Framework","fork":true,"url":"https://api.github.com/repos/Treeston/TrinityCore","forks_url":"https://api.github.com/repos/Treeston/TrinityCore/forks","keys_url":"https://api.github.com/repos/Treeston/TrinityCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Treeston/TrinityCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Treeston/TrinityCore/teams","hooks_url":"https://api.github.com/repos/Treeston/TrinityCore/hooks","issue_events_url":"https://api.github.com/repos/Treeston/TrinityCore/issues/events{/number}","events_url":"https://api.github.com/repos/Treeston/TrinityCore/events","assignees_url":"https://api.github.com/repos/Treeston/TrinityCore/assignees{/user}","branches_url":"https://api.github.com/repos/Treeston/TrinityCore/branches{/branch}","tags_url":"https://api.github.com/repos/Treeston/TrinityCore/tags","blobs_url":"https://api.github.com/repos/Treeston/TrinityCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Treeston/TrinityCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Treeston/TrinityCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/Treeston/TrinityCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Treeston/TrinityCore/statuses/{sha}","languages_url":"https://api.github.com/repos/Treeston/TrinityCore/languages","stargazers_url":"https://api.github.com/repos/Treeston/TrinityCore/stargazers","contributors_url":"https://api.github.com/repos/Treeston/TrinityCore/contributors","subscribers_url":"https://api.github.com/repos/Treeston/TrinityCore/subscribers","subscription_url":"https://api.github.com/repos/Treeston/TrinityCore/subscription","commits_url":"https://api.github.com/repos/Treeston/TrinityCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/Treeston/TrinityCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/Treeston/TrinityCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/Treeston/TrinityCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/Treeston/TrinityCore/contents/{+path}","compare_url":"https://api.github.com/repos/Treeston/TrinityCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Treeston/TrinityCore/merges","archive_url":"https://api.github.com/repos/Treeston/TrinityCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Treeston/TrinityCore/downloads","issues_url":"https://api.github.com/repos/Treeston/TrinityCore/issues{/number}","pulls_url":"https://api.github.com/repos/Treeston/TrinityCore/pulls{/number}","milestones_url":"https://api.github.com/repos/Treeston/TrinityCore/milestones{/number}","notifications_url":"https://api.github.com/repos/Treeston/TrinityCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Treeston/TrinityCore/labels{/name}","releases_url":"https://api.github.com/repos/Treeston/TrinityCore/releases{/id}","deployments_url":"https://api.github.com/repos/Treeston/TrinityCore/deployments","created_at":"2015-09-09T15:54:20Z","updated_at":"2016-04-02T15:45:18Z","pushed_at":"2016-09-18T23:02:28Z","git_url":"git://github.com/Treeston/TrinityCore.git","ssh_url":"git@github.com:Treeston/TrinityCore.git","clone_url":"https://github.com/Treeston/TrinityCore.git","svn_url":"https://github.com/Treeston/TrinityCore","homepage":"http://www.trinitycore.org","size":348066,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"3.3.5"}},"base":{"label":"TrinityCore:3.3.5","ref":"3.3.5","sha":"b5035582b656df780e8ebeeb3647288bf1be8256","user":{"login":"TrinityCore","id":539602,"avatar_url":"https://avatars.githubusercontent.com/u/539602?v=3","gravatar_id":"","url":"https://api.github.com/users/TrinityCore","html_url":"https://github.com/TrinityCore","followers_url":"https://api.github.com/users/TrinityCore/followers","following_url":"https://api.github.com/users/TrinityCore/following{/other_user}","gists_url":"https://api.github.com/users/TrinityCore/gists{/gist_id}","starred_url":"https://api.github.com/users/TrinityCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrinityCore/subscriptions","organizations_url":"https://api.github.com/users/TrinityCore/orgs","repos_url":"https://api.github.com/users/TrinityCore/repos","events_url":"https://api.github.com/users/TrinityCore/events{/privacy}","received_events_url":"https://api.github.com/users/TrinityCore/received_events","type":"Organization","site_admin":false},"repo":{"id":1204412,"name":"TrinityCore","full_name":"TrinityCore/TrinityCore","owner":{"login":"TrinityCore","id":539602,"avatar_url":"https://avatars.githubusercontent.com/u/539602?v=3","gravatar_id":"","url":"https://api.github.com/users/TrinityCore","html_url":"https://github.com/TrinityCore","followers_url":"https://api.github.com/users/TrinityCore/followers","following_url":"https://api.github.com/users/TrinityCore/following{/other_user}","gists_url":"https://api.github.com/users/TrinityCore/gists{/gist_id}","starred_url":"https://api.github.com/users/TrinityCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrinityCore/subscriptions","organizations_url":"https://api.github.com/users/TrinityCore/orgs","repos_url":"https://api.github.com/users/TrinityCore/repos","events_url":"https://api.github.com/users/TrinityCore/events{/privacy}","received_events_url":"https://api.github.com/users/TrinityCore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TrinityCore/TrinityCore","description":"TrinityCore Open Source MMO Framework","fork":false,"url":"https://api.github.com/repos/TrinityCore/TrinityCore","forks_url":"https://api.github.com/repos/TrinityCore/TrinityCore/forks","keys_url":"https://api.github.com/repos/TrinityCore/TrinityCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TrinityCore/TrinityCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TrinityCore/TrinityCore/teams","hooks_url":"https://api.github.com/repos/TrinityCore/TrinityCore/hooks","issue_events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/events{/number}","events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/events","assignees_url":"https://api.github.com/repos/TrinityCore/TrinityCore/assignees{/user}","branches_url":"https://api.github.com/repos/TrinityCore/TrinityCore/branches{/branch}","tags_url":"https://api.github.com/repos/TrinityCore/TrinityCore/tags","blobs_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/{sha}","languages_url":"https://api.github.com/repos/TrinityCore/TrinityCore/languages","stargazers_url":"https://api.github.com/repos/TrinityCore/TrinityCore/stargazers","contributors_url":"https://api.github.com/repos/TrinityCore/TrinityCore/contributors","subscribers_url":"https://api.github.com/repos/TrinityCore/TrinityCore/subscribers","subscription_url":"https://api.github.com/repos/TrinityCore/TrinityCore/subscription","commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/TrinityCore/TrinityCore/contents/{+path}","compare_url":"https://api.github.com/repos/TrinityCore/TrinityCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TrinityCore/TrinityCore/merges","archive_url":"https://api.github.com/repos/TrinityCore/TrinityCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TrinityCore/TrinityCore/downloads","issues_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues{/number}","pulls_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls{/number}","milestones_url":"https://api.github.com/repos/TrinityCore/TrinityCore/milestones{/number}","notifications_url":"https://api.github.com/repos/TrinityCore/TrinityCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels{/name}","releases_url":"https://api.github.com/repos/TrinityCore/TrinityCore/releases{/id}","deployments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/deployments","created_at":"2010-12-28T23:40:07Z","updated_at":"2016-09-19T01:11:05Z","pushed_at":"2016-09-19T06:02:34Z","git_url":"git://github.com/TrinityCore/TrinityCore.git","ssh_url":"git@github.com:TrinityCore/TrinityCore.git","clone_url":"https://github.com/TrinityCore/TrinityCore.git","svn_url":"https://github.com/TrinityCore/TrinityCore","homepage":"http://www.trinitycore.org","size":801519,"stargazers_count":3473,"watchers_count":3473,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3548,"mirror_url":null,"open_issues_count":1324,"forks":3548,"open_issues":1324,"watchers":3473,"default_branch":"6.x"}},"_links":{"self":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17946"},"html":{"href":"https://github.com/TrinityCore/TrinityCore/pull/17946"},"issue":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17946"},"comments":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17946/comments"},"review_comments":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17946/comments"},"review_comment":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17946/commits"},"statuses":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/0ebe61a42f30d9fc32d8b889697a70c40cb09471"}}}}
{"actor":{"display_login":"Treeston"}}