{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/233","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/233/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/233/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/233/events","html_url":"https://github.com/chrsmith/bwapi/issues/233","id":58649155,"number":233,"title":"Game::canBuildHere -- Bad collision logic","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-Medium","name":"Priority-Medium","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":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-23T21:13:20Z","updated_at":"2015-02-23T21:13:21Z","closed_at":"2015-02-23T21:13:20Z","body":"```\nWhat steps will reproduce the problem?\n1. I've attached an AI module. Run it, playing as Terran.\n2. Select your SCVs and right-click on the Command Center so that they are \nright next to it.\n3. Lift-off the Command Center.\n4. Enter \"Terran Command Center\". (It can be any argument to \nUnitTypes::getUnitType.)\n5. Circles will be drawn indicating canBuildHere returning true, but a circle \nis not drawn where the Command Center originally was.\n6. If you land the Command Center back to where it was, the build tile \npositions will indicate that you can.\n\nWhat is the expected output? What do you see instead?\nGame::canBuildHere gives a false negative in collision detection between a \nproposed building and existing units. Currently, units that occupy the same \nbuild tiles that the proposed building will is taken to mean that the units are \nblocking the building. The correct test for collision is if the dimensions boxs \nof the units and the proposed building overlap. (The width of the dimension box \nis dimensionsLeft() + 1 + dimensionsRight(); similarly for height. The origin \nof the dimensions box is Unit::getPosition().) You can verify this test in \nStarCraft's GUI (although it seems that it lets you build if a unit is blocking \na little--the unit just resets collision). Since it seems that Unit::build uses \nGame::canBuildHere, you can't build even though you should be able to.\n\nWhat version of the product are you using? On what operating system?\nBWAPI 2.8. Windows XP.\n\nPlease provide any additional information below.\n\n```\n\n-----\nOriginal issue reported on code.google.com by `eugene.m...@gmail.com` on 16 Aug 2010 at 4:14\n\nAttachments:\n* [ExampleAIModule.dll](https://storage.googleapis.com/google-code-attachments/bwapi/issue-233/comment-0/ExampleAIModule.dll)\n"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/75634197","html_url":"https://github.com/chrsmith/bwapi/issues/233#issuecomment-75634197","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/233","id":75634197,"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-23T21:13:21Z","updated_at":"2015-02-23T21:13:21Z","body":"\n\n-----\nOriginal comment by `AHeinerm` on 18 Aug 2010 at 6:55\n* Changed title: **Game::canBuildHere -- Bad collision logic**"}}