How officers know when to shoot