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 Lobby Manager #1194

Merged
merged 38 commits into from
Jun 3, 2021
Merged

Add Lobby Manager #1194

merged 38 commits into from
Jun 3, 2021

Conversation

mharis001
Copy link
Contributor

When merged this pull request will:

Image

lobby_manager_1

@bux
Copy link
Contributor

bux commented Jul 31, 2019

Very happy someone is working on it :) thanks @mharis001

set3DENSelected [_group];

private _handle = 0 spawn {do3DENAction "CutUnit"};
waitUntil {scriptDone _handle};
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor

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 ;)

Copy link
Contributor

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.

} forEach _groups;

set3DENSelected _selected;
endLoadingScreen;
Copy link
Contributor

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.

addons/ui/stringtable.xml Outdated Show resolved Hide resolved
@commy2
Copy link
Contributor

commy2 commented Feb 22, 2020

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.

@mharis001
Copy link
Contributor Author

mharis001 commented May 31, 2020

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.

Copy link
Contributor

@PabstMirror PabstMirror left a 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

@jonpas jonpas added Feature and removed WIP labels Sep 28, 2020
@jonpas jonpas modified the milestones: Ongoing, 3.16 Sep 28, 2020
@Alablm
Copy link

Alablm commented Sep 29, 2020

@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 ¯\(ツ)

@mharis001
Copy link
Contributor Author

Were you using an older version on your desktop, pre-02d09bd?

@Alablm
Copy link

Alablm commented Sep 30, 2020

Pabs sent me the cba_ui pbo on the 22nd, so presumably no. I was also using the same pbo on both machines.

@PabstMirror PabstMirror modified the milestones: 3.15.3, Ongoing Feb 19, 2021
@jonpas
Copy link
Member

jonpas commented Feb 24, 2021

I reinstalled the PBO and now its working. No idea what happened but ¯(ツ)/¯

I mean, this could very well mean you had an older version.

Copy link
Contributor

@PabstMirror PabstMirror left a 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

addons/ui/stringtable.xml Show resolved Hide resolved
addons/ui/LobbyManager.hpp Show resolved Hide resolved
@PabstMirror PabstMirror modified the milestones: Ongoing, 3.15.4 May 29, 2021
mharis001 and others added 2 commits June 1, 2021 04:11
Co-authored-by: Jo David <github@jonathandavid.de>
@PabstMirror PabstMirror merged commit 4369e19 into CBATeam:master Jun 3, 2021
@mharis001 mharis001 deleted the lobby-manager branch June 3, 2021 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants