CleverRaven/Cataclysm-DDA — pull request #6656 by BevapDin (2014-03-15 11:18:05+00:00)
Title: Use the skill of the used mod when firing a gunmod.

Fixes #5292

There was a block of logic in game.cpp that prevented skill raise above 1 if the ammo was BB or nails, this has been moved to ranged.cpp and is now used there. Previously the skill gain there happened all the time, without the ammo check.

----

There is still a check for the skill of the gun in ranged.cpp, line 444:
```
if (firing->skill_used == Skill::skill("rifle") && range > LONG_RANGE)
total_dispersion *= 1 - 0.4*double(range - LONG_RANGE) / double(range);
```

Maybe this should be changed to the skill of the gunmod?

And there is the special code for point blank shots with a shot gun, which uses the ammo of the gun, not the gunmod:
```
if (range < (firing->volume/3) && firing->ammo != "shot")
total_dispersion *= double(firing->volume/3) / double(range);
```

----

I didn't changed the code in `shoot_player` because that function is never called anywhere.