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

Increase max weapon index for large modsets #5054

Merged
merged 1 commit into from
May 12, 2017
Merged

Conversation

PabstMirror
Copy link
Contributor

Fix #5042

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Apr 3, 2017
@Dystopian
Copy link
Contributor

#4978 doesn't agree

@commy2
Copy link
Contributor

commy2 commented Apr 3, 2017

It's not just macros. Lots of duplicated code. Could use https://github.com/CBATeam/CBA_A3/blob/master/addons/common/fnc_selectWeapon.sqf
?

@@ -44,7 +44,7 @@ if (!isNil "_activeWeaponAndMuzzle") then {
private _index = 0;

while {
_index < 100 && {currentWeaponMode _unit != _activeWeaponMode}
_index < 299 && {currentWeaponMode _unit != _activeWeaponMode}
Copy link
Contributor

Choose a reason for hiding this comment

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

you added 200 to the other indexes. Why only add 199 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing special about the specific number, just needs to be bigger than biggest index.
This way they all use the same number 299

@PabstMirror PabstMirror added this to the 3.10.0 milestone Apr 11, 2017
@PabstMirror PabstMirror merged commit 0cdb2ce into master May 12, 2017
@PabstMirror PabstMirror deleted the maxWeaponIndex branch May 12, 2017 18:12
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.

5 participants