Jump to content

[41.73] [Singleplayer] Aiming skill doesn't seem to affect firearm max range


space_fish

Recommended Posts

• Version? -- 41.73 Stable

• Singleplayer/Multiplayer? -- Singleplayer

• Host or dedicated? -- Singleplayer without any servers

• Mods?  -- No mods

• Old or new save? -- New save

 

• Reproduction steps:

1. Launch in debug mode, spawn in the world with no zombies

2. Find a house with a window, use item list menu to add a 9mm Pistol and a couple of magazines with bullets

3. Start aiming, come close enough to a window to see it being highlighted, but right at the edge of your aiming range

4. Change your Aiming skill via debug menu

5. Walk around and see that your actual aiming range, based on window highlighting, doesn't change with Aiming level -- even though the debug aiming cone does:

 

• Video:

 

Link to comment
Share on other sites

2 hours ago, EnigmaGrey said:

Works fine here.

 

If it's a modded item, someone might have just forgot to add the aiming level range modifier to their script.

 

I'm afraid I didn't use modded items, but vanilla pistol only.

 

Here's longer video with the same issue, and me spawning a pistol and M16 and replicating the thing, showing the loading and that there are no mods etc.

 

I'm sorry if I'm missing something, just wanted to provide some info in case it's relevant.

 

 

Link to comment
Share on other sites

image (3).png

 

DE pistol. You can see it can hit the window its entire length. (Zombie snuck in while I was taking the screenshot, wasn't there earlier.)

 

9MM and m16 can't. So must be something specific to them. Good catch. :D Interesting that it is exactly half the length.

 

image (4).pngimage (5).png

Link to comment
Share on other sites

Ha, that’s kinda interesting.

 

May I ask a question about code meanwhile? I’ve been trying to read through decompiled code trying to reverse engineer hit and crit calculation because I want to make, ahhh, yet another gun mod and want to know the internals to get an idea about how I would balance it.

 

So, I found that in SwipeStatePlayer in CalcHitChance(…) the hit chance is calculated with calling HandWeapon’s getMaxRange without passing player character as an argument, and then making adjustment to hit chance based on raw weapon max range minus distance to target. That means that there could be a situation where your weapon max range that comes from Aiming skill actually penalizes your chance to hit on the edge of your aiming range. Can confirm that behavior with logs and video.


Is that intended?

Edited by space_fish
Typo
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...