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

More various ace arsenal fixes #6192

Merged
merged 7 commits into from
Apr 12, 2018

Conversation

alganthe
Copy link
Contributor

@alganthe alganthe commented Mar 14, 2018

When merged this pull request will:

  • Fix case issue in verifyLoadout
  • Remove uneeded lines related to the perf profiler (doesn't need them anymore)
  • Move that one line this PR was about where it should be;
  • Fix the ace arsenal camera weird behavior underwater or around rocks, the camera will now clip through rocks or other objects to avoid those issues.
  • Gunbags will keep their weapons if you switch to another backpack then back to a gunbag in ace arsenal.

@PabstMirror
Copy link
Contributor

I don't see why this is necessary,
compileStats already does if (!isNil QGVAR(statsListLeftPanel)) exitWith {};
so it should have been safe to call at anytime

@alganthe
Copy link
Contributor Author

I completely forgot it had the check ^
So the PR is pretty much moving one line to preInit from handleStats then.

I don't really want compileStats being called on every page refresh when going through hundreds of items if I can avoid it.

@jonpas jonpas added kind/enhancement Release Notes: **IMPROVED:** status/WIP labels Mar 17, 2018
@jonpas jonpas added this to the 3.13.0 milestone Mar 17, 2018
@alganthe
Copy link
Contributor Author

alganthe commented Apr 9, 2018

Nearly forgot about this, since it ended up being a single line I added a bug fix with it :D

@PabstMirror
Copy link
Contributor

findIf?

@alganthe
Copy link
Contributor Author

alganthe commented Apr 9, 2018

new command added in dev branch: https://community.bistudio.com/wiki/findIf

@jonpas
Copy link
Member

jonpas commented Apr 9, 2018

Is it on RC? No merge if it isn't.

@alganthe
Copy link
Contributor Author

alganthe commented Apr 9, 2018

it was added before the RC, I didn't check if it was on RC and assumed it was, good point.
I'll check.

@alganthe
Copy link
Contributor Author

alganthe commented Apr 9, 2018

Just checked, I can confirm findIf is present on the current RC build (1.82.144616)

@dedmen
Copy link
Contributor

dedmen commented Apr 10, 2018

why use findIf if it's slower than in and everything is already built to be lowercase and work fine with in?

@alganthe
Copy link
Contributor Author

alganthe commented Apr 10, 2018

Because, like I said, findIf is case insensitive while in is case sensitive.
If there wasn't an issue I wouldn't be making that change.

By removing those checks the cam is allowed to clip through objects and work properly underwater, sounds like features to me :D
Switching between gunbags will keep the weapon, switching to another backpack then back to a gunbag will also keep the weapon.
@alganthe alganthe changed the title Compile stats on preInit More various ace arsenal fixes Apr 11, 2018
@alganthe
Copy link
Contributor Author

There, included all the fixes for the issues i'm aware off.

private _center = EGVAR(arsenal,center);

if (_center call FUNC(hasGunBag)) then {
GVAR(arsenalCache) = (backpackContainer _center) getVariable [QGVAR(gunbagWeapon), []];
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use a more descriptive varname. As this always stores the gunbag. Why not gunbagCache?
You might want to use arsenalCache for something like an actual arsenalCache later on.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the full var is:
ace_gunbag_arsenalCache, I don't really know if there's a more descriptive varname :/

Copy link
Contributor

Choose a reason for hiding this comment

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

ooooohhhh. duh. Should've looked at what file that is. Expected it to be in arsenal

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Apr 12, 2018
@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.12.2 Apr 12, 2018
@PabstMirror PabstMirror merged commit 1994e30 into acemod:master Apr 12, 2018
@alganthe alganthe deleted the improveArsenalStatAPI branch October 1, 2018 16:43
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
* Compile stats on preInit

* Remove uneeded check in add/removeStat

* Remove perf profiler vars

They aren't required anymore

* Fix case issue in verifyLoadout, remove uneeded line

* Fix ace arsenal cam not working porperly underwater

By removing those checks the cam is allowed to clip through objects and work properly underwater, sounds like features to me :D

* Fix gunbag behavior in ace arsenal

Switching between gunbags will keep the weapon, switching to another backpack then back to a gunbag will also keep the weapon.

* Fix text scaling in the searchbars and loadout name edit boxes

Also made the text bigger by default
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:** kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants