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

AB - Fix ACE_twistDirection #2839

Merged
merged 1 commit into from
Nov 20, 2015
Merged

AB - Fix ACE_twistDirection #2839

merged 1 commit into from
Nov 20, 2015

Conversation

PabstMirror
Copy link
Contributor

Most guns don't have a ACE_twistDirection and they where defaulting to 0 instead of 1.

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Nov 11, 2015
@PabstMirror PabstMirror added this to the 3.4.0 milestone Nov 11, 2015
if !(_twistDirection in [-1, 0, 1]) then {
_twistDirection = 1;
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getNumber returns 0 and if the value is not setyso I think it's safe to remove isNumber check in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1, 0 and 1 are valid values for ACE_twistDirection
If no such config entry exists, it needs to be 1 not 0, so we need the isNumber check.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see now.

PabstMirror added a commit that referenced this pull request Nov 20, 2015
AB - Fix ACE_twistDirection
@PabstMirror PabstMirror merged commit 9a9029f into master Nov 20, 2015
@PabstMirror PabstMirror deleted the abFixTwist branch November 20, 2015 16:32
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.

3 participants