Attorney: Retired cop thought he shot bad guy