-
Notifications
You must be signed in to change notification settings - Fork 739
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
Conversation
["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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
Also removed |
This is ready to be merged from my side. I'll work on other fixes in a separate PR (time to learn about CfgMoves). |
Fixes #1796
Read #1795 (comment) for Part 1.