{"action":"created","comment":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/264002576","pull_request_review_id":212564293,"id":264002576,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2NDAwMjU3Ng==","diff_hunk":"@@ -18,31 +19,70 @@ namespace OpenRA.Mods.Common.Activities\n {\n \tpublic class AttackMoveActivity : Activity\n \t{\n-\t\tconst int ScanInterval = 7;\n-\n+\t\treadonly Func<Activity> getInner;\n \t\tActivity inner;\n-\t\tint scanTicks;\n+\t\tActivity attack;\n \t\tAutoTarget autoTarget;\n+\t\tbool moving;\n \n-\t\tpublic AttackMoveActivity(Actor self, Activity inner)\n+\t\tpublic AttackMoveActivity(Actor self, Func<Activity> getInner)\n \t\t{\n-\t\t\tthis.inner = inner;\n+\t\t\tthis.getInner = getInner;","path":"OpenRA.Mods.Common/Activities/Move/AttackMoveActivity.cs","position":25,"original_position":25,"commit_id":"b6f0e0376d2541fcdaabd9133fe77fbba772e22b","original_commit_id":"b6f0e0376d2541fcdaabd9133fe77fbba772e22b","user":{"login":"tovl","id":12049990,"node_id":"MDQ6VXNlcjEyMDQ5OTkw","avatar_url":"https://avatars2.githubusercontent.com/u/12049990?v=4","gravatar_id":"","url":"https://api.github.com/users/tovl","html_url":"https://github.com/tovl","followers_url":"https://api.github.com/users/tovl/followers","following_url":"https://api.github.com/users/tovl/following{/other_user}","gists_url":"https://api.github.com/users/tovl/gists{/gist_id}","starred_url":"https://api.github.com/users/tovl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tovl/subscriptions","organizations_url":"https://api.github.com/users/tovl/orgs","repos_url":"https://api.github.com/users/tovl/repos","events_url":"https://api.github.com/users/tovl/events{/privacy}","received_events_url":"https://api.github.com/users/tovl/received_events","type":"User","site_admin":false},"body":"In practice it is either Move or Follow.","created_at":"2019-03-09T15:09:29Z","updated_at":"2019-03-09T15:22:32Z","html_url":"https://github.com/OpenRA/OpenRA/pull/16105#discussion_r264002576","pull_request_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/16105","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/264002576"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/16105#discussion_r264002576"},"pull_request":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/16105"}},"in_reply_to_id":263998899},"pull_request":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/16105","id":247112968,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQ3MTEyOTY4","html_url":"https://github.com/OpenRA/OpenRA/pull/16105","diff_url":"https://github.com/OpenRA/OpenRA/pull/16105.diff","patch_url":"https://github.com/OpenRA/OpenRA/pull/16105.patch","issue_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/16105","number":16105,"state":"open","locked":false,"title":"Revise AttackMoveActivity","user":{"login":"tovl","id":12049990,"node_id":"MDQ6VXNlcjEyMDQ5OTkw","avatar_url":"https://avatars2.githubusercontent.com/u/12049990?v=4","gravatar_id":"","url":"https://api.github.com/users/tovl","html_url":"https://github.com/tovl","followers_url":"https://api.github.com/users/tovl/followers","following_url":"https://api.github.com/users/tovl/following{/other_user}","gists_url":"https://api.github.com/users/tovl/gists{/gist_id}","starred_url":"https://api.github.com/users/tovl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tovl/subscriptions","organizations_url":"https://api.github.com/users/tovl/orgs","repos_url":"https://api.github.com/users/tovl/repos","events_url":"https://api.github.com/users/tovl/events{/privacy}","received_events_url":"https://api.github.com/users/tovl/received_events","type":"User","site_admin":false},"body":"Since this seems to be the underlying cause of many glitches, I decided to tackle this issue.\r\n\r\nImprovements:\r\n- The AttackMove behavior is now completely contained inside AttackMoveActivity. \r\n- Reliance on INotifyIdle.IsIdle is eliminated, thus avoiding a major source of glitchiness.\r\n- AttackMove now also respects any orders queued after it.\r\n\r\nFixes #16092 \r\nFixes #14822\r\nFixes #11439\r\nFixes #9908\r\nFixes #7454\r\n\r\nThe only sacrifice that has to be made is that the inner activity can now no longer be an arbitrary activity. The reason is that the inner activity has to be freshly initialized inside AttackMoveActivity. You cannot restart an activity that is already cancelled, which is what the old implementation tried to do. Therefore, the caller to MoveTo is now hardcoded inside AttackMoveActivity. I am not very experienced with C# so perhaps there is a way to achieve this anyway that I do not now of.\r\n\r\nRegardless, there is only one reference to AttackMoveActivity that needs anything other than MoveTo to initialize the inner activity. Therefore, I made a separate activity for Guard, which needs MoveFollow to initialize it's inner activity.\r\n ","created_at":"2019-01-23T20:55:47Z","updated_at":"2019-03-09T15:22:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76163330230f4f0ff0e8217a75083e4f5d795767","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":117739713,"node_id":"MDU6TGFiZWwxMTc3Mzk3MTM=","url":"https://api.github.com/repos/OpenRA/OpenRA/labels/PR:%20Changes%20requested","name":"PR: Changes requested","color":"e11d21","default":false}],"milestone":{"url":"https://api.github.com/repos/OpenRA/OpenRA/milestones/28","html_url":"https://github.com/OpenRA/OpenRA/milestone/28","labels_url":"https://api.github.com/repos/OpenRA/OpenRA/milestones/28/labels","id":3771531,"node_id":"MDk6TWlsZXN0b25lMzc3MTUzMQ==","number":28,"title":"Next + 1","description":"","creator":{"login":"pchote","id":167819,"node_id":"MDQ6VXNlcjE2NzgxOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/167819?v=4","gravatar_id":"","url":"https://api.github.com/users/pchote","html_url":"https://github.com/pchote","followers_url":"https://api.github.com/users/pchote/followers","following_url":"https://api.github.com/users/pchote/following{/other_user}","gists_url":"https://api.github.com/users/pchote/gists{/gist_id}","starred_url":"https://api.github.com/users/pchote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchote/subscriptions","organizations_url":"https://api.github.com/users/pchote/orgs","repos_url":"https://api.github.com/users/pchote/repos","events_url":"https://api.github.com/users/pchote/events{/privacy}","received_events_url":"https://api.github.com/users/pchote/received_events","type":"User","site_admin":false},"open_issues":46,"closed_issues":12,"state":"open","created_at":"2018-10-26T13:13:22Z","updated_at":"2019-03-09T12:12:52Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/16105/commits","review_comments_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/16105/comments","review_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/16105/comments","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/b6f0e0376d2541fcdaabd9133fe77fbba772e22b","head":{"label":"tovl:fix-AttackMove","ref":"fix-AttackMove","sha":"b6f0e0376d2541fcdaabd9133fe77fbba772e22b","user":{"login":"tovl","id":12049990,"node_id":"MDQ6VXNlcjEyMDQ5OTkw","avatar_url":"https://avatars2.githubusercontent.com/u/12049990?v=4","gravatar_id":"","url":"https://api.github.com/users/tovl","html_url":"https://github.com/tovl","followers_url":"https://api.github.com/users/tovl/followers","following_url":"https://api.github.com/users/tovl/following{/other_user}","gists_url":"https://api.github.com/users/tovl/gists{/gist_id}","starred_url":"https://api.github.com/users/tovl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tovl/subscriptions","organizations_url":"https://api.github.com/users/tovl/orgs","repos_url":"https://api.github.com/users/tovl/repos","events_url":"https://api.github.com/users/tovl/events{/privacy}","received_events_url":"https://api.github.com/users/tovl/received_events","type":"User","site_admin":false},"repo":{"id":165430645,"node_id":"MDEwOlJlcG9zaXRvcnkxNjU0MzA2NDU=","name":"OpenRA","full_name":"tovl/OpenRA","private":false,"owner":{"login":"tovl","id":12049990,"node_id":"MDQ6VXNlcjEyMDQ5OTkw","avatar_url":"https://avatars2.githubusercontent.com/u/12049990?v=4","gravatar_id":"","url":"https://api.github.com/users/tovl","html_url":"https://github.com/tovl","followers_url":"https://api.github.com/users/tovl/followers","following_url":"https://api.github.com/users/tovl/following{/other_user}","gists_url":"https://api.github.com/users/tovl/gists{/gist_id}","starred_url":"https://api.github.com/users/tovl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tovl/subscriptions","organizations_url":"https://api.github.com/users/tovl/orgs","repos_url":"https://api.github.com/users/tovl/repos","events_url":"https://api.github.com/users/tovl/events{/privacy}","received_events_url":"https://api.github.com/users/tovl/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tovl/OpenRA","description":"Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.","fork":true,"url":"https://api.github.com/repos/tovl/OpenRA","forks_url":"https://api.github.com/repos/tovl/OpenRA/forks","keys_url":"https://api.github.com/repos/tovl/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tovl/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tovl/OpenRA/teams","hooks_url":"https://api.github.com/repos/tovl/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/tovl/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/tovl/OpenRA/events","assignees_url":"https://api.github.com/repos/tovl/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/tovl/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/tovl/OpenRA/tags","blobs_url":"https://api.github.com/repos/tovl/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tovl/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tovl/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/tovl/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tovl/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/tovl/OpenRA/languages","stargazers_url":"https://api.github.com/repos/tovl/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/tovl/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/tovl/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/tovl/OpenRA/subscription","commits_url":"https://api.github.com/repos/tovl/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/tovl/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/tovl/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/tovl/OpenRA/issues/comments{/number}","contents_url":"https://api.github.com/repos/tovl/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/tovl/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tovl/OpenRA/merges","archive_url":"https://api.github.com/repos/tovl/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tovl/OpenRA/downloads","issues_url":"https://api.github.com/repos/tovl/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/tovl/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/tovl/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/tovl/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tovl/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/tovl/OpenRA/releases{/id}","deployments_url":"https://api.github.com/repos/tovl/OpenRA/deployments","created_at":"2019-01-12T20:03:26Z","updated_at":"2019-01-12T20:03:36Z","pushed_at":"2019-03-09T14:49:36Z","git_url":"git://github.com/tovl/OpenRA.git","ssh_url":"git@github.com:tovl/OpenRA.git","clone_url":"https://github.com/tovl/OpenRA.git","svn_url":"https://github.com/tovl/OpenRA","homepage":"http://www.openra.net","size":138151,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"bleed"}},"base":{"label":"OpenRA:bleed","ref":"bleed","sha":"dad21fe8792cc5d50115ff9f41094cfbe34ced9d","user":{"login":"OpenRA","id":409046,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwOTA0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/409046?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"repo":{"id":959908,"node_id":"MDEwOlJlcG9zaXRvcnk5NTk5MDg=","name":"OpenRA","full_name":"OpenRA/OpenRA","private":false,"owner":{"login":"OpenRA","id":409046,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwOTA0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/409046?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/OpenRA/OpenRA","description":"Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.","fork":false,"url":"https://api.github.com/repos/OpenRA/OpenRA","forks_url":"https://api.github.com/repos/OpenRA/OpenRA/forks","keys_url":"https://api.github.com/repos/OpenRA/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenRA/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenRA/OpenRA/teams","hooks_url":"https://api.github.com/repos/OpenRA/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/OpenRA/OpenRA/events","assignees_url":"https://api.github.com/repos/OpenRA/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/OpenRA/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/OpenRA/OpenRA/tags","blobs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenRA/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenRA/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenRA/OpenRA/languages","stargazers_url":"https://api.github.com/repos/OpenRA/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/OpenRA/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/OpenRA/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/OpenRA/OpenRA/subscription","commits_url":"https://api.github.com/repos/OpenRA/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenRA/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenRA/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/OpenRA/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenRA/OpenRA/merges","archive_url":"https://api.github.com/repos/OpenRA/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenRA/OpenRA/downloads","issues_url":"https://api.github.com/repos/OpenRA/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenRA/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenRA/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenRA/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/OpenRA/OpenRA/releases{/id}","deployments_url":"https://api.github.com/repos/OpenRA/OpenRA/deployments","created_at":"2010-10-04T07:38:05Z","updated_at":"2019-03-09T12:19:16Z","pushed_at":"2019-03-09T14:49:39Z","git_url":"git://github.com/OpenRA/OpenRA.git","ssh_url":"git@github.com:OpenRA/OpenRA.git","clone_url":"https://github.com/OpenRA/OpenRA.git","svn_url":"https://github.com/OpenRA/OpenRA","homepage":"http://www.openra.net","size":137800,"stargazers_count":6079,"watchers_count":6079,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1700,"mirror_url":null,"archived":false,"open_issues_count":1521,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1700,"open_issues":1521,"watchers":6079,"default_branch":"bleed"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/16105"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/16105"},"issue":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/16105"},"comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/16105/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/16105/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/16105/commits"},"statuses":{"href":"https://api.github.com/repos/OpenRA/OpenRA/statuses/b6f0e0376d2541fcdaabd9133fe77fbba772e22b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tovl"}}