-
Notifications
You must be signed in to change notification settings - Fork 148
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 Lobby Manager #1194
Add Lobby Manager #1194
Conversation
…into slotlist-manager
This reverts commit 9bad948.
Very happy someone is working on it :) thanks @mharis001 |
addons/ui/fnc_openLobbyManager.sqf
Outdated
set3DENSelected [_group]; | ||
|
||
private _handle = 0 spawn {do3DENAction "CutUnit"}; | ||
waitUntil {scriptDone _handle}; |
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.
Can you explain what this is doing?
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.
Delaying the 3DEN actions by a frame (at least) and then resuming after they occur.
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.
I see. spawn takes at least one frame, so the following waitUntil waits for at least one frame.
Could still be rewritten in unscheduled with some stacked execNextFrame decrementing some array. Idk what that would add besides proving a point, ... so I will probably do that.
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.
I thought execNextFrame
was not available in 3DEN, that is why I used scheduled.
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.
to delay one frame you could also just make the waitUntil return false once. But I guess the code for that would atleast look more complicated.
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.
I thought execNextFrame was not available in 3DEN, that is why I used scheduled.
Yeah. Could add a RscMapControl with Draw eh as each frame engine though. Anything to avoid waitUntil and spawn. lol
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.
If we check for bad code we always search for spawn but rarely for waitUntil. Just hide the spawn and noone will know ;)
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.
Oh. Didn't see second spawn above.
addons/ui/fnc_openLobbyManager.sqf
Outdated
} forEach _groups; | ||
|
||
set3DENSelected _selected; | ||
endLoadingScreen; |
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.
This ends all loading screens. might theoretically happen that other mods start other loadingscreens inbetween while your scheduled code runs. Though it's unlikely.
No, I'd rather have you bickering about it not being released than it being broken, because I don't have to maintain unreleased stuff. |
What is the threshold we are going for? I just ran through 50 consecutive successful tests changing both group and unit order and then testing in local MP each time. I think the duplication bugs have been fixed by frame delaying the unit (in addition to group) copy/pasting. |
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.
I send pbo over to someone and they overhauled our mission framework (many units, complex 3den attributes) with no problems so far
could add a little warning may want to backup mission before editing
to UI for a few releases
@PabstMirror This worked on my laptop, however now when I try to use it on my desktop it's duplicating every unit. @jonpas you may want to hold off on approving this. Edit: Picture of issue https://puu.sh/GxsV6/9607c217c8.png Ok so I just double checked, and can confirm it's working as intended on my laptop install, so there's definitely something fucky going on. I reinstalled the PBO and now its working. No idea what happened but ¯\(ツ)/¯ |
Were you using an older version on your desktop, pre-02d09bd? |
Pabs sent me the cba_ui pbo on the 22nd, so presumably no. I was also using the same pbo on both machines. |
I mean, this could very well mean you had an older version. |
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.
This is an extremely useful tool but I've also seen it fail a few times
even so I would much rather have it in and available to use,
with proper backup failure should not be a big deal
Co-authored-by: Jo David <github@jonathandavid.de>
When merged this pull request will:
Image