{"action":"created","comment":{"url":"https://api.github.com/repos/minetest/minetest/pulls/comments/72583703","id":72583703,"diff_hunk":"@@ -1324,52 +1324,52 @@ std::string PlayerSAO::getPropertyPacket()\n \n bool PlayerSAO::checkMovementCheat()\n {\n-\tbool cheated = false;\n-\tif(isAttached() || m_is_singleplayer ||\n-\t\t\tg_settings->getBool(\"disable_anticheat\"))\n-\t{\n+\tif (isAttached() || m_is_singleplayer ||\n+\t\t\tg_settings->getBool(\"disable_anticheat\")) {\n \t\tm_last_good_position = m_player->getPosition();\n+\t\treturn false;\n \t}\n-\telse\n-\t{\n-\t\t/*\n-\t\t\tCheck player movements\n-\n-\t\t\tNOTE: Actually the server should handle player physics like the\n-\t\t\tclient does and compare player's position to what is calculated\n-\t\t\ton our side. This is required when eg. players fly due to an\n-\t\t\texplosion. Altough a node-based alternative might be possible\n-\t\t\ttoo, and much more lightweight.\n-\t\t*/\n-\n-\t\tfloat player_max_speed = 0;\n-\t\tif(m_privs.count(\"fast\") != 0){\n-\t\t\t// Fast speed\n-\t\t\tplayer_max_speed = m_player->movement_speed_fast;\n-\t\t} else {\n-\t\t\t// Normal speed\n-\t\t\tplayer_max_speed = m_player->movement_speed_walk;\n-\t\t}\n-\t\t// Tolerance. With the lag pool we shouldn't need it.\n-\t\t//player_max_speed *= 2.5;\n-\t\t//player_max_speed_up *= 2.5;\n-\n-\t\tv3f diff = (m_player->getPosition() - m_last_good_position);\n-\t\tfloat d_vert = diff.Y;\n-\t\tdiff.Y = 0;\n-\t\tfloat d_horiz = diff.getLength();\n-\t\tfloat required_time = d_horiz/player_max_speed;\n-\t\tif(d_vert > 0 && d_vert/player_max_speed > required_time)\n-\t\t\trequired_time = d_vert/player_max_speed;\n-\t\tif(m_move_pool.grab(required_time)){\n-\t\t\tm_last_good_position = m_player->getPosition();\n-\t\t} else {\n-\t\t\tactionstream<<\"Player \"<<m_player->getName()\n-\t\t\t\t\t<<\" moved too fast; resetting position\"\n-\t\t\t\t\t<<std::endl;\n-\t\t\tm_player->setPosition(m_last_good_position);\n-\t\t\tcheated = true;\n-\t\t}\n+\n+\tbool cheated = false;\n+\t/*\n+\t\tCheck player movements\n+\n+\t\tNOTE: Actually the server should handle player physics like the\n+\t\tclient does and compare player's position to what is calculated\n+\t\ton our side. This is required when eg. players fly due to an\n+\t\texplosion. Altough a node-based alternative might be possible\n+\t\ttoo, and much more lightweight.\n+\t*/\n+\n+\tfloat player_max_speed = 0;\n+\n+\tif (m_privs.count(\"fast\") != 0) {\n+\t\t// Fast speed\n+\t\tplayer_max_speed = m_player->movement_speed_fast * m_physics_override_speed;\n+\t} else {\n+\t\t// Normal speed\n+\t\tplayer_max_speed = m_player->movement_speed_walk * m_physics_override_speed;","path":"src/content_sao.cpp","position":72,"original_position":72,"commit_id":"5e3d7dd2fc8fcbf13518fda47e2d20e3e6dd4e40","original_commit_id":"5e3d7dd2fc8fcbf13518fda47e2d20e3e6dd4e40","user":{"login":"SmallJoker","id":1497498,"avatar_url":"https://avatars.githubusercontent.com/u/1497498?v=3","gravatar_id":"","url":"https://api.github.com/users/SmallJoker","html_url":"https://github.com/SmallJoker","followers_url":"https://api.github.com/users/SmallJoker/followers","following_url":"https://api.github.com/users/SmallJoker/following{/other_user}","gists_url":"https://api.github.com/users/SmallJoker/gists{/gist_id}","starred_url":"https://api.github.com/users/SmallJoker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmallJoker/subscriptions","organizations_url":"https://api.github.com/users/SmallJoker/orgs","repos_url":"https://api.github.com/users/SmallJoker/repos","events_url":"https://api.github.com/users/SmallJoker/events{/privacy}","received_events_url":"https://api.github.com/users/SmallJoker/received_events","type":"User","site_admin":false},"body":"Note to developers: Added `m_physics_override_speed` in both cases.","created_at":"2016-07-28T08:36:08Z","updated_at":"2016-07-28T08:36:08Z","html_url":"https://github.com/minetest/minetest/pull/4303#discussion_r72583703","pull_request_url":"https://api.github.com/repos/minetest/minetest/pulls/4303","_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest/pulls/comments/72583703"},"html":{"href":"https://github.com/minetest/minetest/pull/4303#discussion_r72583703"},"pull_request":{"href":"https://api.github.com/repos/minetest/minetest/pulls/4303"}}},"pull_request":{"url":"https://api.github.com/repos/minetest/minetest/pulls/4303","id":76841506,"html_url":"https://github.com/minetest/minetest/pull/4303","diff_url":"https://github.com/minetest/minetest/pull/4303.diff","patch_url":"https://github.com/minetest/minetest/pull/4303.patch","issue_url":"https://api.github.com/repos/minetest/minetest/issues/4303","number":4303,"state":"open","locked":false,"title":"Anticheat: Use the physics_override modifiers aswell","user":{"login":"SmallJoker","id":1497498,"avatar_url":"https://avatars.githubusercontent.com/u/1497498?v=3","gravatar_id":"","url":"https://api.github.com/users/SmallJoker","html_url":"https://github.com/SmallJoker","followers_url":"https://api.github.com/users/SmallJoker/followers","following_url":"https://api.github.com/users/SmallJoker/following{/other_user}","gists_url":"https://api.github.com/users/SmallJoker/gists{/gist_id}","starred_url":"https://api.github.com/users/SmallJoker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmallJoker/subscriptions","organizations_url":"https://api.github.com/users/SmallJoker/orgs","repos_url":"https://api.github.com/users/SmallJoker/repos","events_url":"https://api.github.com/users/SmallJoker/events{/privacy}","received_events_url":"https://api.github.com/users/SmallJoker/received_events","type":"User","site_admin":false},"body":"Attempt to fix #4291\r\n..and tidy up code.\r\n\r\nEDIT: The code compiled fine but I have no idea how to test this properly.","created_at":"2016-07-09T08:10:13Z","updated_at":"2016-07-28T08:36:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19bef8f927f9b567ab1d47a8ec0cbad93cec0040","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/minetest/minetest/pulls/4303/commits","review_comments_url":"https://api.github.com/repos/minetest/minetest/pulls/4303/comments","review_comment_url":"https://api.github.com/repos/minetest/minetest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/4303/comments","statuses_url":"https://api.github.com/repos/minetest/minetest/statuses/5e3d7dd2fc8fcbf13518fda47e2d20e3e6dd4e40","head":{"label":"SmallJoker:anticheat_partfix","ref":"anticheat_partfix","sha":"5e3d7dd2fc8fcbf13518fda47e2d20e3e6dd4e40","user":{"login":"SmallJoker","id":1497498,"avatar_url":"https://avatars.githubusercontent.com/u/1497498?v=3","gravatar_id":"","url":"https://api.github.com/users/SmallJoker","html_url":"https://github.com/SmallJoker","followers_url":"https://api.github.com/users/SmallJoker/followers","following_url":"https://api.github.com/users/SmallJoker/following{/other_user}","gists_url":"https://api.github.com/users/SmallJoker/gists{/gist_id}","starred_url":"https://api.github.com/users/SmallJoker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmallJoker/subscriptions","organizations_url":"https://api.github.com/users/SmallJoker/orgs","repos_url":"https://api.github.com/users/SmallJoker/repos","events_url":"https://api.github.com/users/SmallJoker/events{/privacy}","received_events_url":"https://api.github.com/users/SmallJoker/received_events","type":"User","site_admin":false},"repo":{"id":44455467,"name":"minetest","full_name":"SmallJoker/minetest","owner":{"login":"SmallJoker","id":1497498,"avatar_url":"https://avatars.githubusercontent.com/u/1497498?v=3","gravatar_id":"","url":"https://api.github.com/users/SmallJoker","html_url":"https://github.com/SmallJoker","followers_url":"https://api.github.com/users/SmallJoker/followers","following_url":"https://api.github.com/users/SmallJoker/following{/other_user}","gists_url":"https://api.github.com/users/SmallJoker/gists{/gist_id}","starred_url":"https://api.github.com/users/SmallJoker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmallJoker/subscriptions","organizations_url":"https://api.github.com/users/SmallJoker/orgs","repos_url":"https://api.github.com/users/SmallJoker/repos","events_url":"https://api.github.com/users/SmallJoker/events{/privacy}","received_events_url":"https://api.github.com/users/SmallJoker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SmallJoker/minetest","description":"Minetest, an open source infinite-world block sandbox game with survival and crafting. [also https://github.com/minetest/minetest_game]","fork":true,"url":"https://api.github.com/repos/SmallJoker/minetest","forks_url":"https://api.github.com/repos/SmallJoker/minetest/forks","keys_url":"https://api.github.com/repos/SmallJoker/minetest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SmallJoker/minetest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SmallJoker/minetest/teams","hooks_url":"https://api.github.com/repos/SmallJoker/minetest/hooks","issue_events_url":"https://api.github.com/repos/SmallJoker/minetest/issues/events{/number}","events_url":"https://api.github.com/repos/SmallJoker/minetest/events","assignees_url":"https://api.github.com/repos/SmallJoker/minetest/assignees{/user}","branches_url":"https://api.github.com/repos/SmallJoker/minetest/branches{/branch}","tags_url":"https://api.github.com/repos/SmallJoker/minetest/tags","blobs_url":"https://api.github.com/repos/SmallJoker/minetest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SmallJoker/minetest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SmallJoker/minetest/git/refs{/sha}","trees_url":"https://api.github.com/repos/SmallJoker/minetest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SmallJoker/minetest/statuses/{sha}","languages_url":"https://api.github.com/repos/SmallJoker/minetest/languages","stargazers_url":"https://api.github.com/repos/SmallJoker/minetest/stargazers","contributors_url":"https://api.github.com/repos/SmallJoker/minetest/contributors","subscribers_url":"https://api.github.com/repos/SmallJoker/minetest/subscribers","subscription_url":"https://api.github.com/repos/SmallJoker/minetest/subscription","commits_url":"https://api.github.com/repos/SmallJoker/minetest/commits{/sha}","git_commits_url":"https://api.github.com/repos/SmallJoker/minetest/git/commits{/sha}","comments_url":"https://api.github.com/repos/SmallJoker/minetest/comments{/number}","issue_comment_url":"https://api.github.com/repos/SmallJoker/minetest/issues/comments{/number}","contents_url":"https://api.github.com/repos/SmallJoker/minetest/contents/{+path}","compare_url":"https://api.github.com/repos/SmallJoker/minetest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SmallJoker/minetest/merges","archive_url":"https://api.github.com/repos/SmallJoker/minetest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SmallJoker/minetest/downloads","issues_url":"https://api.github.com/repos/SmallJoker/minetest/issues{/number}","pulls_url":"https://api.github.com/repos/SmallJoker/minetest/pulls{/number}","milestones_url":"https://api.github.com/repos/SmallJoker/minetest/milestones{/number}","notifications_url":"https://api.github.com/repos/SmallJoker/minetest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SmallJoker/minetest/labels{/name}","releases_url":"https://api.github.com/repos/SmallJoker/minetest/releases{/id}","deployments_url":"https://api.github.com/repos/SmallJoker/minetest/deployments","created_at":"2015-10-17T21:33:55Z","updated_at":"2016-06-15T16:09:34Z","pushed_at":"2016-07-28T08:34:30Z","git_url":"git://github.com/SmallJoker/minetest.git","ssh_url":"git@github.com:SmallJoker/minetest.git","clone_url":"https://github.com/SmallJoker/minetest.git","svn_url":"https://github.com/SmallJoker/minetest","homepage":"http://minetest.net/","size":41270,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"minetest:master","ref":"master","sha":"8a98cbda8417c713e03d1ac0be80e88cd2f08a0c","user":{"login":"minetest","id":2624745,"avatar_url":"https://avatars.githubusercontent.com/u/2624745?v=3","gravatar_id":"","url":"https://api.github.com/users/minetest","html_url":"https://github.com/minetest","followers_url":"https://api.github.com/users/minetest/followers","following_url":"https://api.github.com/users/minetest/following{/other_user}","gists_url":"https://api.github.com/users/minetest/gists{/gist_id}","starred_url":"https://api.github.com/users/minetest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minetest/subscriptions","organizations_url":"https://api.github.com/users/minetest/orgs","repos_url":"https://api.github.com/users/minetest/repos","events_url":"https://api.github.com/users/minetest/events{/privacy}","received_events_url":"https://api.github.com/users/minetest/received_events","type":"Organization","site_admin":false},"repo":{"id":2168780,"name":"minetest","full_name":"minetest/minetest","owner":{"login":"minetest","id":2624745,"avatar_url":"https://avatars.githubusercontent.com/u/2624745?v=3","gravatar_id":"","url":"https://api.github.com/users/minetest","html_url":"https://github.com/minetest","followers_url":"https://api.github.com/users/minetest/followers","following_url":"https://api.github.com/users/minetest/following{/other_user}","gists_url":"https://api.github.com/users/minetest/gists{/gist_id}","starred_url":"https://api.github.com/users/minetest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minetest/subscriptions","organizations_url":"https://api.github.com/users/minetest/orgs","repos_url":"https://api.github.com/users/minetest/repos","events_url":"https://api.github.com/users/minetest/events{/privacy}","received_events_url":"https://api.github.com/users/minetest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/minetest/minetest","description":"Minetest, an open source infinite-world block sandbox game with survival and crafting. [also https://github.com/minetest/minetest_game]","fork":false,"url":"https://api.github.com/repos/minetest/minetest","forks_url":"https://api.github.com/repos/minetest/minetest/forks","keys_url":"https://api.github.com/repos/minetest/minetest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minetest/minetest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minetest/minetest/teams","hooks_url":"https://api.github.com/repos/minetest/minetest/hooks","issue_events_url":"https://api.github.com/repos/minetest/minetest/issues/events{/number}","events_url":"https://api.github.com/repos/minetest/minetest/events","assignees_url":"https://api.github.com/repos/minetest/minetest/assignees{/user}","branches_url":"https://api.github.com/repos/minetest/minetest/branches{/branch}","tags_url":"https://api.github.com/repos/minetest/minetest/tags","blobs_url":"https://api.github.com/repos/minetest/minetest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minetest/minetest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minetest/minetest/git/refs{/sha}","trees_url":"https://api.github.com/repos/minetest/minetest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minetest/minetest/statuses/{sha}","languages_url":"https://api.github.com/repos/minetest/minetest/languages","stargazers_url":"https://api.github.com/repos/minetest/minetest/stargazers","contributors_url":"https://api.github.com/repos/minetest/minetest/contributors","subscribers_url":"https://api.github.com/repos/minetest/minetest/subscribers","subscription_url":"https://api.github.com/repos/minetest/minetest/subscription","commits_url":"https://api.github.com/repos/minetest/minetest/commits{/sha}","git_commits_url":"https://api.github.com/repos/minetest/minetest/git/commits{/sha}","comments_url":"https://api.github.com/repos/minetest/minetest/comments{/number}","issue_comment_url":"https://api.github.com/repos/minetest/minetest/issues/comments{/number}","contents_url":"https://api.github.com/repos/minetest/minetest/contents/{+path}","compare_url":"https://api.github.com/repos/minetest/minetest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minetest/minetest/merges","archive_url":"https://api.github.com/repos/minetest/minetest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minetest/minetest/downloads","issues_url":"https://api.github.com/repos/minetest/minetest/issues{/number}","pulls_url":"https://api.github.com/repos/minetest/minetest/pulls{/number}","milestones_url":"https://api.github.com/repos/minetest/minetest/milestones{/number}","notifications_url":"https://api.github.com/repos/minetest/minetest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minetest/minetest/labels{/name}","releases_url":"https://api.github.com/repos/minetest/minetest/releases{/id}","deployments_url":"https://api.github.com/repos/minetest/minetest/deployments","created_at":"2011-08-07T13:48:36Z","updated_at":"2016-07-28T08:22:43Z","pushed_at":"2016-07-28T08:34:30Z","git_url":"git://github.com/minetest/minetest.git","ssh_url":"git@github.com:minetest/minetest.git","clone_url":"https://github.com/minetest/minetest.git","svn_url":"https://github.com/minetest/minetest","homepage":"http://minetest.net/","size":114427,"stargazers_count":2091,"watchers_count":2091,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":655,"mirror_url":null,"open_issues_count":821,"forks":655,"open_issues":821,"watchers":2091,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest/pulls/4303"},"html":{"href":"https://github.com/minetest/minetest/pull/4303"},"issue":{"href":"https://api.github.com/repos/minetest/minetest/issues/4303"},"comments":{"href":"https://api.github.com/repos/minetest/minetest/issues/4303/comments"},"review_comments":{"href":"https://api.github.com/repos/minetest/minetest/pulls/4303/comments"},"review_comment":{"href":"https://api.github.com/repos/minetest/minetest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minetest/minetest/pulls/4303/commits"},"statuses":{"href":"https://api.github.com/repos/minetest/minetest/statuses/5e3d7dd2fc8fcbf13518fda47e2d20e3e6dd4e40"}}}}
{"actor":{"display_login":"SmallJoker"}}