Last active
December 17, 2022 21:48
-
-
Save FlynnOConnell/ba94a250051e10a58f504d71b2100fc0 to your computer and use it in GitHub Desktop.
Main Queue Server Logic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void PremierSuite::queue(ServerWrapper server, void* params, std::string eventName) { | |
| float totalQueueDelayTime = 0; | |
| float autoGGDelayTime = cvarManager->getCvar("ranked_autogg_delay").getFloatValue() / 1000; | |
| bool autoGG = cvarManager->getCvar("ranked_autogg").getBoolValue(); | |
| float queueDelayTime = cvarManager->getCvar(qDelayCvarName).getFloatValue(); | |
| bool disableCasualQueue = cvarManager->getCvar(disableCasualQCvarName).getBoolValue(); | |
| bool disablePrivate = cvarManager->getCvar(disablePrivateCvarName).getBoolValue(); | |
| if (autoGG) { | |
| totalQueueDelayTime = queueDelayTime + autoGGDelayTime; | |
| cvarManager->log("ps. totalQueueDelayTime has been set"); | |
| } | |
| else { | |
| totalQueueDelayTime = queueDelayTime; | |
| } | |
| if (!server.IsNull() && (disablePrivate || disableCasualQueue)) { | |
| auto playlist = (Mode)server.GetPlaylist().GetPlaylistId(); | |
| if ((playlist == CasualChaos || playlist == CasualDoubles || playlist == CasualDuel || playlist == CasualStandard) && disableCasualQueue) { | |
| return; | |
| } | |
| else if ((playlist == Private || playlist == Tournament) && disablePrivate) { | |
| return; | |
| } | |
| else { | |
| gameWrapper->SetTimeout(std::bind(&PremierSuite::delayedQueue, this), queueDelayTime); | |
| cvarManager->log("ps. settimeout(delayedQueue, queueDelaytime) has been called"); | |
| } | |
| } | |
| gameWrapper->SetTimeout(std::bind(&PremierSuite::delayedQueue, this), queueDelayTime); | |
| cvarManager->log("ps. settimeout(delayedQueue, queueDelaytime) has been called"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment