{"action":"created","issue":{"url":"https://api.github.com/repos/cmangos/mangos-classic/issues/215","repository_url":"https://api.github.com/repos/cmangos/mangos-classic","labels_url":"https://api.github.com/repos/cmangos/mangos-classic/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/cmangos/mangos-classic/issues/215/comments","events_url":"https://api.github.com/repos/cmangos/mangos-classic/issues/215/events","html_url":"https://github.com/cmangos/mangos-classic/pull/215","id":187579010,"number":215,"title":"Fix typo in VMap BIH generation","user":{"login":"mityada","id":522716,"avatar_url":"https://avatars.githubusercontent.com/u/522716?v=3","gravatar_id":"","url":"https://api.github.com/users/mityada","html_url":"https://github.com/mityada","followers_url":"https://api.github.com/users/mityada/followers","following_url":"https://api.github.com/users/mityada/following{/other_user}","gists_url":"https://api.github.com/users/mityada/gists{/gist_id}","starred_url":"https://api.github.com/users/mityada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mityada/subscriptions","organizations_url":"https://api.github.com/users/mityada/orgs","repos_url":"https://api.github.com/users/mityada/repos","events_url":"https://api.github.com/users/mityada/events{/privacy}","received_events_url":"https://api.github.com/users/mityada/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-11-06T18:27:35Z","updated_at":"2016-11-29T11:08:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cmangos/mangos-classic/pulls/215","html_url":"https://github.com/cmangos/mangos-classic/pull/215","diff_url":"https://github.com/cmangos/mangos-classic/pull/215.diff","patch_url":"https://github.com/cmangos/mangos-classic/pull/215.patch"},"body":"Due to this typo some objects could be left out during BIH generation and thus never checked for intersection. This breaks height and LoS calculations in some areas.\r\n\r\nThe occurrence of this bug can be seen in \"Md_Mushroomcave.wmo\". It can be found in several locations, for example (-6140, -2960, 400), map 0. In some parts of the cave mobs will either fall through the ground or fly up into the sky when chasing the player. LoS is not obstructed there as well.\r\n\r\nP. S. This typo presents in all MaNGOS cores."},"comment":{"url":"https://api.github.com/repos/cmangos/mangos-classic/issues/comments/263542484","html_url":"https://github.com/cmangos/mangos-classic/pull/215#issuecomment-263542484","issue_url":"https://api.github.com/repos/cmangos/mangos-classic/issues/215","id":263542484,"user":{"login":"ryancheung","id":240899,"avatar_url":"https://avatars.githubusercontent.com/u/240899?v=3","gravatar_id":"","url":"https://api.github.com/users/ryancheung","html_url":"https://github.com/ryancheung","followers_url":"https://api.github.com/users/ryancheung/followers","following_url":"https://api.github.com/users/ryancheung/following{/other_user}","gists_url":"https://api.github.com/users/ryancheung/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancheung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancheung/subscriptions","organizations_url":"https://api.github.com/users/ryancheung/orgs","repos_url":"https://api.github.com/users/ryancheung/repos","events_url":"https://api.github.com/users/ryancheung/events{/privacy}","received_events_url":"https://api.github.com/users/ryancheung/received_events","type":"User","site_admin":false},"created_at":"2016-11-29T11:08:38Z","updated_at":"2016-11-29T11:08:38Z","body":"I've tested this version(with rebulding maps, vmaps and mmaps), which is working. The path generated with this patch is normal in the caves. @cyberium \r\n\r\n```diff\r\n--- a/src/game/vmap/BIH.cpp\r\n+++ b/src/game/vmap/BIH.cpp\r\n@@ -155,8 +155,8 @@ void BIH::subdivide(int left, int right, std::vector<uint32>& tempTree, buildDat\r\n             if (prevAxis == axis && G3D::fuzzyEq(prevSplit, split))\r\n             {\r\n                 // we are stuck here - create a leaf\r\n-                stats.updateLeaf(depth, right - left + 1);\r\n-                createNode(tempTree, nodeIndex, left, right);\r\n+                stats.updateLeaf(depth, rightOrig - left + 1);\r\n+                createNode(tempTree, nodeIndex, left, rightOrig);\r\n                 return;\r\n             }\r\n             right = rightOrig;\r\n```"}}
{"actor":{"display_login":"ryancheung"}}