The British Army had rules of engagement which we were expected to abide by in Northern Ireland which dictated when we could use our weapon. This is the famous "Yellow Card":
This card details when the baton round could be fired:
Even though we had a certain amount of latitude in using our weapons, we were not allowed to shoot wildly. Soldiers did find themselves up against boards of inquiry if a civilain was accidentally shot. The case that comes to mind for me was when the SAS trooper shot a farm kid who had found an IRA weapons cache and had come back to see if it was still there.
See this on self-defence by the military in English law