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

Akward Sitting Fixes Part 2 #1806

Merged
merged 3 commits into from
Jul 25, 2015
Merged

Akward Sitting Fixes Part 2 #1806

merged 3 commits into from
Jul 25, 2015

Conversation

jonpas
Copy link
Member

@jonpas jonpas commented Jul 5, 2015

Fixes #1796

Read #1795 (comment) for Part 1.

["medical_onUnconscious", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
["SetHandcuffed", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
["SetSurrendered", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
["medical_onUnconscious", {_player call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
Copy link
Contributor

Choose a reason for hiding this comment

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

Throwing:

Error position: <_player call ace_sitting_fnc_handleInter>
Error Undefined variable in expression: _player
File z\ace\addons\sitting\XEH_clientInit.sqf, line 10

Test codes:

[] spawn {
    [player, true] call ace_medical_fnc_setUnconscious;
    sleep 10;
    [player, false] call ace_medical_fnc_setUnconscious;
};

[] spawn {
    ["SetHandcuffed", [player, true]] call ace_common_fnc_localEvent;
    sleep 10;
    ["SetHandcuffed", [player, false]] call ace_common_fnc_localEvent;
};

I don't think this should be changed at all and keep it as _this.
For all 3 events the unit is the first argument, which is what handleInterrupt is expecting.

Copy link
Member Author

Choose a reason for hiding this comment

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

Weird, worked just fine for me, I thought I'd remove number of arguments sending. Will fix!

On that note, are there any performance differences in how many arguments you are sending, even if so small it's not worth it?

@jonpas
Copy link
Member Author

jonpas commented Jul 7, 2015

Also removed SetSurrendered as that option is not available when sitting.

@jonpas
Copy link
Member Author

jonpas commented Jul 11, 2015

This is ready to be merged from my side. I'll work on other fixes in a separate PR (time to learn about CfgMoves).

@thojkooi thojkooi added this to the 3.2.0 milestone Jul 25, 2015
@thojkooi thojkooi added the kind/bug-fix Release Notes: **FIXED:** label Jul 25, 2015
thojkooi added a commit that referenced this pull request Jul 25, 2015
@thojkooi thojkooi merged commit 3514f07 into acemod:master Jul 25, 2015
@jonpas jonpas deleted the sittingFixes branch July 26, 2015 01:39
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.

3 participants