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

ToDo: Cleanup all use of "SwitchWeapon" spam #9129

Closed
PabstMirror opened this issue Jan 23, 2023 · 0 comments · Fixed by #10113
Closed

ToDo: Cleanup all use of "SwitchWeapon" spam #9129

PabstMirror opened this issue Jan 23, 2023 · 0 comments · Fixed by #10113
Milestone

Comments

@PabstMirror
Copy link
Contributor

e.g.

    while {
        _index < 299 && {currentWeapon _vehicle != _weapon}
    } do {
        _unit action ["SwitchWeapon", _vehicle, _unit, _index];
        _index = _index + 1;
    };

ace_safemode
ace_respawn
ace_weaponselect

helper func https://github.com/acemod/ACE3/blob/5aac4c201aec160f861d96116a10efa2e2f10ad5/addons/common/functions/fnc_getFiremodeIndex.sqf

https://github.com/acemod/ACE3/blob/master/addons/safemode/functions/fnc_unlockSafety.sqf#L66-L72
should be able to be replaced with

    // switch to last mode
    private _index = [_unit, _weapon, _mode] call EFUNC(common,getFiremodeIndex);
    _unit action ["SwitchWeapon", _unit, _unit, _index];

but the original func doesn't seem to work as expected, the "rollover" never happens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants