New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Realistic gun cleaning #34470
Realistic gun cleaning #34470
Conversation
Co-Authored-By: Anton Burmistrov <Night_Pryanik@mail.ru>
If this get merged, we necessarily must apply gun fouling mechanics to robots' and turrets' guns. |
Gun fouling was already merged. This just changes and makes a bit more realistic the items required to clean a gun. But I get your point. Bot guns would be IRL subject to similar faults as a player's gun, albeit a bot probably is not as likely to suffer a malfunction due to the fixed and optimized (for reliability, not ergonomics) nature of the gun. Given 1,600 rounds (the highest I've seen in an automatic enemy) the bot would eventually gain a 3% chance of suffering a jam per round fired given current rates. A bot would also be unable to clear a jam given the way I envision most bots if they were built in real life. |
Dunno if I could do it using the ranged.cpp values by pulling them from there directly, but I think it would be possible to rewrite mattach_actors.cpp to keep track of dirt accumulation separately. Not currently sure of how to do it with a bot wielding multiple weapons, though (like the beagle). |
Anyway, turret fouling might be better saved for a separate PR. |
This seems wrong. Many firearms will function ok without lubricants- they'll do better with it, but they'll function without. Solvents such as Hoppes are nice, yes, but the bare minimum one needs are water, scrubbing, and a drying. The amount of lubricant that is actually necessary is going to be about <1mL, the parts only need a very thin film of oil/grease/dry lube to function optimally. As such, I recommend drastically reworking the requirements for clearing faults and the resources necessary. |
True, but keep in mind that while a tiny film of the stuff is what's technically used, IRL you're going to apply a lot more to get it everywhere, with the excess dripping off or getting where it's not needed. |
Oops wrong button! |
Still, your current implementation does not reflect how little one needs in terms of resources to remediate fouling, as cleaning can literally be done with hot water and a stiff brush. 20mL of lubricant seems far too much still. Perhaps 1-2 mL. |
I reduced it more, but I don't think you'd be able to get away with 1-2 mL. When I've cleaned guns, I generally go through at least 10 mL of solvent, and that's on a small handgun using an atomizer for efficiency. Between the spray angle being too wide and the stuff evaporating quickly, it's rather hard to be 1 mL efficient. |
There are approximately 20 'drop's per mL of solution, glossing over other factors such as surface tension and density. For a Glock: 8 drops on slide rails, 1 drop on barrel wear points, 1 drop on trigger bar. |
It's definitely possible to use a lot less than 10 mL if you know EXACTLY where the lube needs to go, are working with a fairly small weapon with parts that are easy to reach, and have precision application tools to apply the oil precisely, so I reduced it again. I still don't think the typical survivor would be able to be so frugal with the oil, but since it's theoretically possible, I reduced it. |
Co-Authored-By: Jianxiang Wang (王健翔) <qrox@sina.com>
Co-Authored-By: Jianxiang Wang (王健翔) <qrox@sina.com>
Co-Authored-By: Jianxiang Wang (王健翔) <qrox@sina.com>
Co-Authored-By: Jianxiang Wang (王健翔) <qrox@sina.com>
Co-Authored-By: BevapDin <tho_ki@gmx.de>
Co-Authored-By: anothersimulacrum <anothersimulacrum@gmail.com>
Co-Authored-By: anothersimulacrum <anothersimulacrum@gmail.com>
Co-Authored-By: anothersimulacrum <anothersimulacrum@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Just a few things:
Please move your comments onto separate lines, putting them after the {
is
- Ugly
- Increases line length significantly, impacting readability
Any word on this? Been a long time. |
Realistic gun cleaning (CleverRaven#34470)
Summary
SUMMARY: Content "Makes gun cleaning more realistic."
Purpose of change
Cleaning a gun requires solvents. After using a solvent, a gun must be oiled to make it function. Some guns (esp. budget guns) don't even come oiled and must be cleaned/oiled before first use or else they will fail to cycle. Previously, the game just used an unlimited use bore rod to clean the gun.
Describe the solution
Using a kit or bore rod now also requires the use of solvents like gas or alcohol. It also creates an unlubricated malfunction after using the solvent, which then requires the use of a lubricant like lamp oil or cooking oil to make the gun work properly again. Unlubed guns will fail to cycle and can be damaged eventually, but are definitely better than a very dirty gun in the heat of battle.
Describe alternatives you've considered
Nothing seriously.
Additional context