{"action":"created","comment":{"url":"https://api.github.com/repos/minetest/minetest/pulls/comments/110517302","pull_request_review_id":31700029,"id":110517302,"diff_hunk":"@@ -388,31 +301,79 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,\n \t\t\t\tcontinue;\n \n \t\t\tmin_distance_f = distance_f;\n-\t\t\tnew_sneak_node = p;\n+\t\t\tm_sneak_node = p;\n+\t\t\tm_sneak_node_exists = true;\n \t\t}\n \n-\t\tbool sneak_node_found = (min_distance_f < 100000.0 * BS);\n-\t\tm_sneak_node = new_sneak_node;\n-\t\tm_sneak_node_exists = sneak_node_found;\n-\n-\t\tif (sneak_node_found) {\n+\t\tif (m_sneak_node_exists) {\n \t\t\t// Update saved top bounding box of sneak node\n-\t\t\tMapNode n = map->getNodeNoEx(m_sneak_node);\n+\t\t\tnode = map->getNodeNoEx(m_sneak_node);\n \t\t\tstd::vector<aabb3f> nodeboxes;\n-\t\t\tn.getCollisionBoxes(nodemgr, &nodeboxes);\n+\t\t\tnode.getCollisionBoxes(nodemgr, &nodeboxes);\n \t\t\tm_sneak_node_bb_top = getTopBoundingBox(nodeboxes);\n \n-\t\t\tm_sneak_ladder_detected = physics_override_sneak_glitch &&\n-\t\t\t\t\tdetectSneakLadder(map, nodemgr, floatToInt(position, BS));\n-\t\t} else {\n-\t\t\tm_sneak_ladder_detected = false;\n+\t\t\tif (physics_override_sneak_glitch) {\n+\t\t\t\t// Detect sneak ladder:\n+\t\t\t\t// Node two meters above sneak node must be solid\n+\t\t\t\tnode = map->getNodeNoEx(m_sneak_node + v3s16(0,2,0),\n+\t\t\t\t\t&is_valid_position);\n+\t\t\t\tif (is_valid_position && nodemgr->get(node).walkable) {\n+\t\t\t\t\t// Node three meters above: must be non-solid\n+\t\t\t\t\tnode = map->getNodeNoEx(m_sneak_node + v3s16(0,3,0),\n+\t\t\t\t\t\t&is_valid_position);\n+\t\t\t\t\tm_sneak_ladder_detected = is_valid_position &&\n+\t\t\t\t\t\t!nodemgr->get(node).walkable;\n+\t\t\t\t}\n+\t\t\t}\n \t\t}\n \t}\n \n+\tif (m_sneak_ladder_detected) {\n+\t\t// restore legacy behaviour (this makes the m_speed.Y hack necessary)\n+\t\tsneak_max = v3f(0.4 * BS, 0, 0.4 * BS);\n+\t}\n+\n+\t/*\n+\t\tIf sneaking, keep in range from the last walked node and don't\n+\t\tfall off from it\n+\t*/\n+\tif (could_sneak && m_sneak_node_exists) {\n+\t\tconst v3f sn_f = intToFloat(m_sneak_node, BS);\n+\t\tconst v3f bmin = m_sneak_node_bb_top.MinEdge;\n+\t\tconst v3f bmax = m_sneak_node_bb_top.MaxEdge;\n+\t\tconst v3f old_pos = position;\n+\n+\t\tposition.X = rangelim(position.X,\n+\t\t\tsn_f.X + bmin.X - sneak_max.X, sn_f.X + bmax.X + sneak_max.X);\n+\t\tposition.Z = rangelim(position.Z,\n+\t\t\tsn_f.Z + bmin.Z - sneak_max.Z, sn_f.Z + bmax.Z + sneak_max.Z);\n+\n+\t\tif (position.X != old_pos.X)\n+\t\t\tm_speed.X = 0;\n+\t\tif (position.Z != old_pos.Z)\n+\t\t\tm_speed.Z = 0;\n+\n+\t\tif (m_speed.Y < 0) {\n+\t\t\tposition.Y = MYMAX(position.Y, sn_f.Y + bmax.Y);\n+\t\t\tif (position.Y > old_pos.Y) {\n+\t\t\t\tCollisionInfo sn_info;","path":"src/localplayer.cpp","position":319,"original_position":319,"commit_id":"d5aa9a002c2740119c1f565c77b094cd041e914f","original_commit_id":"d5aa9a002c2740119c1f565c77b094cd041e914f","user":{"login":"SmallJoker","id":1497498,"avatar_url":"https://avatars2.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":"> // Handle only fall damage\r\n// (because otherwise walking against something in fast_move kills you)\r\n[clientenvironment.cpp](https://github.com/minetest/minetest/blob/master/src/clientenvironment.cpp#L221)\r\nWill add the collision entry for X,Z axis too.","created_at":"2017-04-08T12:12:34Z","updated_at":"2017-04-08T12:12:34Z","html_url":"https://github.com/minetest/minetest/pull/5533#discussion_r110517302","pull_request_url":"https://api.github.com/repos/minetest/minetest/pulls/5533","_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest/pulls/comments/110517302"},"html":{"href":"https://github.com/minetest/minetest/pull/5533#discussion_r110517302"},"pull_request":{"href":"https://api.github.com/repos/minetest/minetest/pulls/5533"}}},"pull_request":{"url":"https://api.github.com/repos/minetest/minetest/pulls/5533","id":114808802,"html_url":"https://github.com/minetest/minetest/pull/5533","diff_url":"https://github.com/minetest/minetest/pull/5533.diff","patch_url":"https://github.com/minetest/minetest/pull/5533.patch","issue_url":"https://api.github.com/repos/minetest/minetest/issues/5533","number":5533,"state":"open","locked":false,"title":"Sneak: Strip down version","user":{"login":"SmallJoker","id":1497498,"avatar_url":"https://avatars2.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":"New new new (new?) sneak code.\r\n- Removes variables `got_teleported`, `m_old_node_below*` and `m_need_to_get_new_sneak_node`\r\n- Removes `air` node check for expired sneak nodes\r\n- Various code style corrections (ignore whitespaces to review)\r\n- Moves `detectSneakLadder` as four-liner into the node detection code\r\n- Reduces climbing speed of sneak ladders **!**\r\n- ~~1-row sneak ladders are **slower** than using regular ladders~~\r\n\r\nFeatures:\r\n- [x] No ugly sinking\r\n- [x] 2 row sneak ladders\r\n- [ ] 1 row sneak ladders\r\n- [ ] Sneaking on nodes with large collision box (> 1 node)\r\n- [x] No damage evading\r\n- [x] Jitter when moving against sneak limit (#5449)\r\n- [x] Fixed weird walking on [stairs](https://i.imgur.com/EtkNVPZ.png)\r\n\r\n*summons @Fixer-007 to report the issues*","created_at":"2017-04-07T12:48:51Z","updated_at":"2017-04-08T12:12:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0017031556739e58fc555a130f825fda69ab6d4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/minetest/minetest/pulls/5533/commits","review_comments_url":"https://api.github.com/repos/minetest/minetest/pulls/5533/comments","review_comment_url":"https://api.github.com/repos/minetest/minetest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/5533/comments","statuses_url":"https://api.github.com/repos/minetest/minetest/statuses/d5aa9a002c2740119c1f565c77b094cd041e914f","head":{"label":"SmallJoker:sneak1","ref":"sneak1","sha":"d5aa9a002c2740119c1f565c77b094cd041e914f","user":{"login":"SmallJoker","id":1497498,"avatar_url":"https://avatars2.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://avatars2.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":"2017-04-08T07:06:15Z","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":47331,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"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":"271d7c31e69db0bb6c5cf2cfb6e97ba129045d3e","user":{"login":"minetest","id":2624745,"avatar_url":"https://avatars2.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://avatars2.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":"2017-04-08T03:17:27Z","pushed_at":"2017-04-08T12:07:53Z","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":47088,"stargazers_count":2488,"watchers_count":2488,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":757,"mirror_url":null,"open_issues_count":1043,"forks":757,"open_issues":1043,"watchers":2488,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest/pulls/5533"},"html":{"href":"https://github.com/minetest/minetest/pull/5533"},"issue":{"href":"https://api.github.com/repos/minetest/minetest/issues/5533"},"comments":{"href":"https://api.github.com/repos/minetest/minetest/issues/5533/comments"},"review_comments":{"href":"https://api.github.com/repos/minetest/minetest/pulls/5533/comments"},"review_comment":{"href":"https://api.github.com/repos/minetest/minetest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minetest/minetest/pulls/5533/commits"},"statuses":{"href":"https://api.github.com/repos/minetest/minetest/statuses/d5aa9a002c2740119c1f565c77b094cd041e914f"}}}}
{"actor":{"display_login":"SmallJoker"}}