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

Pylons - Fix old weapons not being removed #6100

Merged
merged 3 commits into from
Feb 10, 2018
Merged

Conversation

PabstMirror
Copy link
Contributor

Fix #6088

  • Use removeWeaponTurret instead of removeWeaponGlobal
  • Fix "Too Far" warning showing on completion

Tag @654wak654

I have no idea why removeWeaponGlobal doesn't work for pilot seat of some RHS helis, but removeWeaponTurret works just fine.

Fix  #6088
- Use removeWeaponTurret instead of removeWeaponGlobal
- Fix "Too Far" warning showing on completion
@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Jan 30, 2018
@PabstMirror PabstMirror added this to the 3.13.0 milestone Jan 30, 2018
{
if (_aircraft turretLocal _x) then {
TRACE_3("removing",_aircraft,_x,_removeWeapon);
_aircraft removeWeaponTurret [_removeWeapon, [-1]];
Copy link
Contributor

Choose a reason for hiding this comment

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

[-1] -> _x ? I didn't test yet but it looks strange.

@@ -149,7 +149,10 @@ if (!GVAR(isCurator)) then {
isNull (GVAR(currentAircraft) getVariable [QGVAR(currentUser), objNull]) ||
{(ace_player distanceSqr GVAR(currentAircraft)) > GVAR(searchDistanceSqr)}
}, {
[localize LSTRING(TooFar), false, 5] call EFUNC(common,displayText);
TRACE_3("disconnect/far",GVAR(currentAircraft), ace_player distance GVAR(currentAircraft),GVAR(currentAircraft) getVariable QGVAR(currentUser));
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a rogue space in the macro.


// Remove the weapon of current pylon from aircraft IF weapon is only on this pylon
private _removeWeapon = "";
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe call it _weaponToRemove?

Co-Authored-By: Ozan Eğitmen <[email protected]>
@PabstMirror PabstMirror mentioned this pull request Feb 8, 2018
@PabstMirror PabstMirror merged commit 4cabaa4 into master Feb 10, 2018
@PabstMirror PabstMirror deleted the remPylonWeaps branch February 10, 2018 01:18
@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.12.2 Apr 2, 2018
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
* Pylons - Fix old weapons not being removed

Fix  #6088
- Use removeWeaponTurret instead of removeWeaponGlobal
- Fix "Too Far" warning showing on completion

* Fix _x

* Fix var name

Co-Authored-By: Ozan Eğitmen <[email protected]>
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.

4 participants