{"action":"created","issue":{"url":"https://api.github.com/repos/bwapi/bwapi/issues/557","labels_url":"https://api.github.com/repos/bwapi/bwapi/issues/557/labels{/name}","comments_url":"https://api.github.com/repos/bwapi/bwapi/issues/557/comments","events_url":"https://api.github.com/repos/bwapi/bwapi/issues/557/events","html_url":"https://github.com/bwapi/bwapi/issues/557","id":58353560,"number":557,"title":"alwaysZero1 in MovementFlags.h","user":{"login":"BoomerangAide","id":10210650,"avatar_url":"https://avatars.githubusercontent.com/u/10210650?v=3","gravatar_id":"","url":"https://api.github.com/users/BoomerangAide","html_url":"https://github.com/BoomerangAide","followers_url":"https://api.github.com/users/BoomerangAide/followers","following_url":"https://api.github.com/users/BoomerangAide/following{/other_user}","gists_url":"https://api.github.com/users/BoomerangAide/gists{/gist_id}","starred_url":"https://api.github.com/users/BoomerangAide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BoomerangAide/subscriptions","organizations_url":"https://api.github.com/users/BoomerangAide/orgs","repos_url":"https://api.github.com/users/BoomerangAide/repos","events_url":"https://api.github.com/users/BoomerangAide/events{/privacy}","received_events_url":"https://api.github.com/users/BoomerangAide/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bwapi/bwapi/labels/Priority-None","name":"Priority-None","color":"FFFFFF"},{"url":"https://api.github.com/repos/bwapi/bwapi/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-20T13:36:30Z","updated_at":"2015-06-23T05:25:24Z","closed_at":"2015-06-23T05:25:24Z","body":"Hi,\r\n\r\nI'm working on a GPTP fork, and trying to upgrade it with some data of BWAPI (when the code is similar enough).\r\nI saw that in \" bwapi/bwapi/BWAPI/Source/BW/MovementFlags.h \" the bit for 0x80 is named alwaysZero1, something I would assume to mean that this bit is always 0.\r\nBut in GPTP, there's this piece of code in hooks\\spider_mine.cpp:\r\n\r\n\t\t//Don't attack hovering units\r\n\t\tif (units_dat::MovementFlags[target->id] == (0x01 | 0x40 | 0x80))  //Note: This is not a mistake; SC actually uses a \"==\" comparison to check flags (I know it's a WTF).\r\n\t\t  return false;\r\n\r\nSo I'm wondering, is that GPTP code mistaken (it would never be triggered if 0x80 is always 0), or is the name alwaysZero1 in BWAPI misleading?"},"comment":{"url":"https://api.github.com/repos/bwapi/bwapi/issues/comments/114362830","html_url":"https://github.com/bwapi/bwapi/issues/557#issuecomment-114362830","issue_url":"https://api.github.com/repos/bwapi/bwapi/issues/557","id":114362830,"user":{"login":"heinermann","id":1966366,"avatar_url":"https://avatars.githubusercontent.com/u/1966366?v=3","gravatar_id":"","url":"https://api.github.com/users/heinermann","html_url":"https://github.com/heinermann","followers_url":"https://api.github.com/users/heinermann/followers","following_url":"https://api.github.com/users/heinermann/following{/other_user}","gists_url":"https://api.github.com/users/heinermann/gists{/gist_id}","starred_url":"https://api.github.com/users/heinermann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heinermann/subscriptions","organizations_url":"https://api.github.com/users/heinermann/orgs","repos_url":"https://api.github.com/users/heinermann/repos","events_url":"https://api.github.com/users/heinermann/events{/privacy}","received_events_url":"https://api.github.com/users/heinermann/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T05:25:24Z","updated_at":"2015-06-23T05:25:24Z","body":"The file being discussed is [here](https://github.com/bwapi/bwapi/blob/master/bwapi/BWAPI/Source/BW/MovementFlags.h).\r\n\r\nThis is actually unrelated to your original code snippet. I just realized it, but you're looking at movement flags in `units.dat` (unit type). This file is specifically for the [movementFlags field](https://github.com/bwapi/bwapi/blob/master/bwapi/BWAPI/Source/BW/CUnit.h#L59) in the CUnit definition.\r\n"}}