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

Fix(explosives): Selecting a cellphone as an IEDs trigger would throw an error #5963

Merged
merged 2 commits into from
Dec 26, 2017

Conversation

bux
Copy link
Member

@bux bux commented Dec 23, 2017

When merged this pull request will:

@bux bux added the kind/bug-fix Release Notes: **FIXED:** label Dec 23, 2017
@bux bux added this to the 3.13.0 milestone Dec 23, 2017
@bux bux changed the title Fix cellphone speed dial Fix(explosives): Selecting the cellphone as a trigger would throw an error Dec 23, 2017
@bux bux changed the title Fix(explosives): Selecting the cellphone as a trigger would throw an error Fix(explosives): Selecting a cellphone as an IEDs trigger would throw an error Dec 23, 2017
@dedmen
Copy link
Contributor

dedmen commented Dec 23, 2017

Btw I broke that private thingy 💃

@@ -19,6 +19,9 @@
params ["_unit"];
TRACE_1("params",_unit);

// close cellphone if open
closeDialog 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

runs on all local units
if (_unit == ace_player) then {

Copy link
Member Author

@bux bux Dec 23, 2017

Choose a reason for hiding this comment

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

done, thx

private _codeSet = false;

while {!_codeSet} do {
Copy link
Member

Choose a reason for hiding this comment

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

Alternative:

private _code = "";
while {true} do {
    _code = [round(random 9999),4] call EFUNC(common,numberToDigitsString);
    if (([_code] call FUNC(getSpeedDialExplosive)) isEqualTo []) exitWith {};
};

@PabstMirror PabstMirror merged commit 54320eb into master Dec 26, 2017
@PabstMirror PabstMirror deleted the fix-speed-dial branch December 26, 2017 23:20
@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.12.1 Dec 31, 2017
@bux bux mentioned this pull request Jan 2, 2018
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
… an error (#5963)

* move code var to outer scope

* run closeDialog only for the player
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.

IED not linkable with cellphone
4 participants