Normally in FPS games shotguns use a very simple accuracy pattern: There is a set "cone" of accuracy that is centered around the crosshair. For ZMBE we decided to go a bit deeper. Instead of the simple method explained, our code works a bit different:
Player presses fire ----> Initial cone center is displaced ----> Shell is being fired (on a set cone around this new displaced center) ----> Player view is shaken a bit + Player view center ends up displaced after the shot
This servers several purposes: Different shotgun characteristics are taken into account, like barrel length which then determines damage, base accuracy, spread and amount of kick the player experiences. This difference the defines the usage of each shotgun. For example a sawn-off baikal has a very high spread and low accuracy, which makes it a very useful close-combat weapon because you can hardly miss a zombie trying to claw you. On the other side the 28" barrel Remington 870 Wingmaster Express has excellent accuracy and an ultra tight spread, which makes it great for long range shooting, but you might actually miss a fast moving zombie coming close to you.