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

Advanced Ballistics - Fix _maxRange in handleFired #8552

Merged
merged 2 commits into from
Oct 27, 2021
Merged

Conversation

PabstMirror
Copy link
Contributor

_vanillaInitialSpeed was never defined so _maxRange was always nil
inner _maxRange was private, (would be nil only on first run, afterwords it would use the getVar)

the only effect these had was the exitWith would always fail

if (ACE_player distance _unit > _maxRange && {ACE_player distance ((getPosASL _unit) vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply _maxRange)) > _maxRange}) exitWith {};

I was getting range of about 1000 for a sniper rifle which almost seem a little low?

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Oct 18, 2021
@PabstMirror PabstMirror added this to the 3.14.1 milestone Oct 18, 2021
@jonpas jonpas changed the title AdvBallistics - Fix _maxRange in handleFired Advanced Ballistics - Fix _maxRange in handleFired Oct 18, 2021
@PabstMirror
Copy link
Contributor Author

Because these distance checks never worked, I am worried by enabling them now it could make things worse
I am thinking of maybe adding 30% extra to _maxRange just for safety?

@PabstMirror PabstMirror merged commit afca8ec into master Oct 27, 2021
@PabstMirror PabstMirror deleted the abFixRange branch October 27, 2021 00:17
AndreasBrostrom pushed a commit to AndreasBrostrom/ACE3 that referenced this pull request Dec 3, 2021
* AdvBallistics - Fix _maxRange in `handleFired`

* Adding 30% more to range just to be safe
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