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 an option to cancel unflipping #9

Closed
veteran29 opened this issue Apr 9, 2019 · 4 comments
Closed

Add an option to cancel unflipping #9

veteran29 opened this issue Apr 9, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@veteran29
Copy link
Owner

Needs to be done if unflipping time option would allow bigger values.

@veteran29 veteran29 added the enhancement New feature or request label Apr 9, 2019
@McDiod
Copy link
Contributor

McDiod commented Jul 7, 2019

Seconded. We would like to use this addon, but need this feature first. Do you need any help with this? I can PR if that speeds it up.

@veteran29
Copy link
Owner Author

I'm busy right now and have no time to implement this, so if you have time feel free to PR that.

Current implementation is kinda "lazy", if server sees it has enough people it just schedules the unflip after certain time and forces people to stay still for that time. (it could use an animation too)
https://github.com/veteran29/vet_unflipping/blob/master/addons/unflipping/XEH_preInitServer.sqf#L18-L23

Contributions always welcome!

@McDiod
Copy link
Contributor

McDiod commented Jul 7, 2019

Working on it, concept so far is:

  • replace server side unflip scheduling wait time with a continuous check for vet_unflippingUnits < _requiredUnits
  • send vet_unflipping_unflip_stop event to server, if client aborts unflipping progressBar
  • if remaining unflippingUnits are < _requiredUnits, enter fnc_unflipAction waiting progressBar again

Currently having trouble differentiating between different progressBar failure modes. User who hit ESC is supposed to send unflip_stop event to server. Users who did not hit ESC, but are aborted, because _requiredUnits threshold is no longer met, should not send unflip_stop event.

The needed error code argument will hopefully be added in the next CBA release.
CBATeam/CBA_A3#1177

@veteran29
Copy link
Owner Author

Concept logic seems solid for me. 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants