{"action":"created","issue":{"url":"https://api.github.com/repos/endless-sky/endless-sky/issues/506","labels_url":"https://api.github.com/repos/endless-sky/endless-sky/issues/506/labels{/name}","comments_url":"https://api.github.com/repos/endless-sky/endless-sky/issues/506/comments","events_url":"https://api.github.com/repos/endless-sky/endless-sky/issues/506/events","html_url":"https://github.com/endless-sky/endless-sky/issues/506","id":123889847,"number":506,"title":"Clicking multiple times on friendly ships turns them hostile","user":{"login":"bobafetthotmail","id":9494179,"avatar_url":"https://avatars.githubusercontent.com/u/9494179?v=3","gravatar_id":"","url":"https://api.github.com/users/bobafetthotmail","html_url":"https://github.com/bobafetthotmail","followers_url":"https://api.github.com/users/bobafetthotmail/followers","following_url":"https://api.github.com/users/bobafetthotmail/following{/other_user}","gists_url":"https://api.github.com/users/bobafetthotmail/gists{/gist_id}","starred_url":"https://api.github.com/users/bobafetthotmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobafetthotmail/subscriptions","organizations_url":"https://api.github.com/users/bobafetthotmail/orgs","repos_url":"https://api.github.com/users/bobafetthotmail/repos","events_url":"https://api.github.com/users/bobafetthotmail/events{/privacy}","received_events_url":"https://api.github.com/users/bobafetthotmail/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/endless-sky/endless-sky/labels/mechanics","name":"mechanics","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-25T16:47:32Z","updated_at":"2015-12-27T22:43:03Z","closed_at":null,"body":"I'm on a bactrian with automated fire on.\r\n\r\nIf I (right or left) click multiple times on an already-selected friendly ship while fighting, it eventually turns red and I attack it.\r\n\r\nI managed to get even the game dev's own ship (a special kestrel) to turn on me.\r\n\r\nI think it is a bug because it is random and not stated in options panels.\r\nSometimes they turn red after 2 clicks, sometimes they need up to 10."},"comment":{"url":"https://api.github.com/repos/endless-sky/endless-sky/issues/comments/167445699","html_url":"https://github.com/endless-sky/endless-sky/issues/506#issuecomment-167445699","issue_url":"https://api.github.com/repos/endless-sky/endless-sky/issues/506","id":167445699,"user":{"login":"dplepage","id":107468,"avatar_url":"https://avatars.githubusercontent.com/u/107468?v=3","gravatar_id":"","url":"https://api.github.com/users/dplepage","html_url":"https://github.com/dplepage","followers_url":"https://api.github.com/users/dplepage/followers","following_url":"https://api.github.com/users/dplepage/following{/other_user}","gists_url":"https://api.github.com/users/dplepage/gists{/gist_id}","starred_url":"https://api.github.com/users/dplepage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dplepage/subscriptions","organizations_url":"https://api.github.com/users/dplepage/orgs","repos_url":"https://api.github.com/users/dplepage/repos","events_url":"https://api.github.com/users/dplepage/events{/privacy}","received_events_url":"https://api.github.com/users/dplepage/received_events","type":"User","site_admin":false},"created_at":"2015-12-27T22:43:03Z","updated_at":"2015-12-27T22:43:03Z","body":"Autofire means \"If there is an enemy in range, fire your weapons at the nearest enemy\", and the target ship can always be hit be weapons fire. Consequently, if you target a neutral ship, but the nearest enemy is right behind them, you'll autofire at the enemy and hit your target instead.\r\n\r\nIf you're using lasers, this will only last for a single frame, because you'll hit the target ship instantly, they'll immediately turn hostile, and from that point forwards they'll be the closest enemy and all your weapons will be (correctly) targeting them.\r\n\r\nPerhaps clicking shouldn't select non-hostile targets while your ship is autofiring? Or perhaps the autofire code should explicitly check to see if there's a non-hostile but targeted ship between you and the nearest enemy? Or maybe there should be a panel that pauses the game and displays the statuses of all the ships in your system, so that you can check on your allies without having to target them with your weapons?"}}