{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/169","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/169/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/169/events","html_url":"https://github.com/chrsmith/bwapi/issues/169","id":58480913,"number":169,"title":"Correction to GetDistance","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Component-Logic","name":"Component-Logic","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Priority-Low","name":"Priority-Low","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Type-Defect","name":"Type-Defect","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Usability","name":"Usability","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-02-21T23:54:37Z","updated_at":"2015-02-21T23:54:38Z","closed_at":null,"body":"```\nWhat steps will reproduce the problem?\n\ne.g:\n1. Place 2 Hydras (115px,117 px) away from each other\n2. getDistance(unit* target) will calculate 134,35 px distance, Hydra-\nmaxrange is 128px\n3. Hydra attacks nontheless\n\nWhat is the expected output? What do you see instead?\nexpected: not attacking, instead: attacking :)\n\nWhat version of the product are you using? On what operating system?\nBWAPI 2.4, WinXP\n```\n\n-----\nOriginal issue reported on code.google.com by `st.ba...@gmail.com` on 16 Dec 2009 at 5:51"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/75401207","html_url":"https://github.com/chrsmith/bwapi/issues/169#issuecomment-75401207","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/169","id":75401207,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-21T23:54:37Z","updated_at":"2015-02-21T23:54:37Z","body":"```\nsorry:\ndelta x= 115 px (difference of x-coordinate)\ndelta y= 117 px (difference of y-coordinate)\nresults in a distance (calculated by getDistance(unit* target) of 134.35 px\n\naccording to the unit->getType().groundWeapon()->maxRange(); the attack range \nof the \nhydra is 128 px, so they are standing 6.25 pixels to far away form each other \nto \nattack - in theory. In game they just attack (without moving closer).\n\nhope that clarifies my previous post, but I'm not really sure if this \"bug\" is \nrelated to BWAPI. It just seems, that the game itself calculates the \"is in \nrange to \nattack\" differently (maybe not from edge to edge)\n```\n\n-----\nOriginal comment by `st.ba...@gmail.com` on 17 Dec 2009 at 2:15"}}