There is zero evidence Z set out to shoot someone, or that he had his gun out to confront TM. Rather obvious when you receive an ass beating and shoot someone at the end, you did not enter the event with your gun planning to shoot.
If you started with your gun out, it would no longer be available to you once your ass whooping was underway, you would have been disarmed.
No evidence of any plan to shoot anyone.
Z should have talked nice to junior gangster to avoid being sucker punched and attacked.