KLFServer.ServerClient.screenshotFloodIncrement C# (CSharp) Méthode

screenshotFloodIncrement() public méthode

public screenshotFloodIncrement ( ) : void
Résultat void
        public void screenshotFloodIncrement()
        {
            //Reset the counter if enough time has passed
            if (parent.currentMillisecond - throttleState.screenshotFloodCounterTime > SCREENSHOT_THROTTLE_INTERVAL)
            {
                throttleState.screenshotFloodCounter = 0;
                throttleState.screenshotFloodCounterTime = parent.currentMillisecond;
            }

            throttleState.screenshotFloodCounter++;
            if (throttleState.screenshotFloodCounter >= parent.settings.screenshotFloodLimit)
            {
                //If the client has shared too many screenshots in the last interval, throttle them
                throttleState.screenshotThrottleUntilTime = parent.currentMillisecond + parent.settings.screenshotFloodThrottleTime;
            }
        }