Skip to content
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

Rangecard - fix CTD on weapons with invalid configs #10710

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

PabstMirror
Copy link
Contributor

@PabstMirror PabstMirror commented Feb 2, 2025

"ace" callExtension ["ballistics:zero_advanced",[200,0,6.69248,15,1013.25,0,0.5,1,"ICAO"]]
will crash game, key number probably is 2nd (muzzle velocity of 0)

can reproduce with western sahri AA12

todo:

  • handle in extension as well
panicked at extension\src\ballistics\drag.rs:167:45:
attempt to subtract with overflow
  • look into AA12 configs and why calculateBarrelLengthVelocityShift is returning 0

@PabstMirror PabstMirror added this to the 3.19.1 milestone Feb 2, 2025
@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Feb 2, 2025
@PabstMirror PabstMirror marked this pull request as ready for review February 5, 2025 00:17
@PabstMirror
Copy link
Contributor Author

some bad weapons in our modset DSA_XTS, ptv_bm4, CUP_sgun_SPAS12, CUP_sgun_AA12, CUP_sgun_slamfire, cwr3_sgun_kozlice
mostly shotguns

they have a barrelLen set for the gun but nothing for the ammo configs so ace_advanced_ballistics_fnc_calculateBarrelLengthVelocityShift returns 0
and calling the ext with 0 mv caused the crash

both issues should now be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants