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

Add support for non local Zeus RC in common-isPlayer #3052

Merged
merged 2 commits into from
Dec 31, 2015

Conversation

PabstMirror
Copy link
Contributor

Adds support for non-local zeus remote controlled units in isPlayer.
So this command will now work consistantly on any machine.

Uses a BIS setVar from the zeus module, had to add a disconnect handler to clear variable.
Slightly faster as well.

I think this is important for consistent behavior, for example wind deflection does:
if (!([_unit] call EFUNC(common,isPlayer))) exitWith {false};
Right now only the zeus would run the code, so the bullet's path won't appear consistent with it's effects.

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Dec 18, 2015
@PabstMirror PabstMirror added this to the 3.4.2 milestone Dec 18, 2015
@commy2
Copy link
Contributor

commy2 commented Dec 18, 2015

Nice.

ACE_LOGINFO_3("[%1] DC - Was Zeus [%2] while controlling unit [%3] - manually clearing `bis_fnc_moduleRemoteControl_owner`", [_x] call FUNC(getName), _dcPlayer, _x);
_x setVariable ["bis_fnc_moduleRemoteControl_owner", nil, true];
};
} count (curatorEditableObjects _zeusLogic);
Copy link
Member

Choose a reason for hiding this comment

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

iirc there has been a discussion in slack that we always should return something in count loops. nil, false etc...

Copy link
Member

Choose a reason for hiding this comment

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

This will implicitly return nil, though it is probably good practise to do that explicitly

PabstMirror added a commit that referenced this pull request Dec 31, 2015
Add support for non local Zeus RC in common-isPlayer
@PabstMirror PabstMirror merged commit 19f5407 into release Dec 31, 2015
@PabstMirror PabstMirror deleted the isPlayerRemoteZeus branch December 31, 2015 21:14
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