Mathel, you're right only on the basics, % hitchance just decreases deviation. However its influence on deviation is capped at 109, and it's not gaussian, it's equally distributed which point you pick in the cone of fire.
Solarius, it's not. Except for determining how valuable cover and crouch is. And for deciding the value of colt over glock, but you only need basic info for that.
I feel I'm just missing one part. The code is right there at
https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/src/Battlescape/Projectile.cpp.
Deviation = (random number between 0 and 100) - (accuracy * 100) + (50 if sum to the left >= 0 (meaning a miss), else 10).
There are 16 voxels in a tile as Yankes just told us.
Then it's basically (not actually because zShift is complicated) multiplied by (voxelRange / 200), and capped to 1 if it's lower than 1.
The only question that remains is,
why is Yankes saying the deviation is 10? It should be 1. 100-120+10 = -10, which will be capped to 1. 1 voxel deviation should never miss. Apparently however, my math should.