Bug report:
Trying to figure out why accuracy wasn't working for gun mods, I found out the problem in itypedef:
#define GUNMOD(name, rare, value, color, mat1, mat2, volume, weight, meleedam,\
meleecut, meleehit, acc, damage, loudness, clip, recoil, burst,\
newtype, pistol, shotgun, smg, rifle, a_a_t, des)\
index++; itypes.push_back(new it_gunmod(index, rare, value, name, des, ':',\
color, mat1, mat2, volume, weight, meleedam,\
meleecut, meleehit, acc, 0, damage, loudness, clip,\
recoil, burst, newtype, a_a_t, pistol, shotgun,\
smg, rifle))
Should be:
#define GUNMOD(name, rare, value, color, mat1, mat2, volume, weight, meleedam,\
meleecut, meleehit, accuracy, damage, loudness, clip, recoil, burst,\
newtype, pistol, shotgun, smg, rifle, a_a_t, des)\
index++; itypes.push_back(new it_gunmod(index, rare, value, name, des, ':',\
color, mat1, mat2, volume, weight, meleedam,\
meleecut, meleehit, 0, accuracy, damage, loudness, clip,\
recoil, burst, newtype, a_a_t, pistol, shotgun,\
smg, rifle))
With those changes it properly references accuracy and all the accuracy modifying gun mods work.
Oh hey, I just found the reason people complained of being able to hit things less at high skill. Not an overflow, just a bad formula.
deviation -= rng(0, 5 * (4 - p.sklevel[firing->skill_used] - 4));
That extra 4 - in front is screwing it up, making every skill point in whatever gun you have throw off your accuracy by 5.