mirror of
https://github.com/Deathgarden-Rebirth/Deathgarden_Rebirth-Rewrite.git
synced 2026-04-26 10:15:28 -05:00
put the sleep timer outside the function
This commit is contained in:
parent
199863e507
commit
bb93c05ec0
|
|
@ -78,6 +78,8 @@ public function handle(): void
|
||||||
));
|
));
|
||||||
|
|
||||||
$playerCount = $this->getTotalPlayersCount($players);
|
$playerCount = $this->getTotalPlayersCount($players);
|
||||||
|
if ($playerCount->hunters === 1 && ($playerCount->runners === 4 || $playerCount->runners === 5))
|
||||||
|
sleep(10);
|
||||||
$availableMatchConfigs = MatchConfiguration::getAvailableMatchConfigs($playerCount->runners, $playerCount->hunters);
|
$availableMatchConfigs = MatchConfiguration::getAvailableMatchConfigs($playerCount->runners, $playerCount->hunters);
|
||||||
|
|
||||||
if($availableMatchConfigs->isEmpty())
|
if($availableMatchConfigs->isEmpty())
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,6 @@ class MatchConfiguration extends Model
|
||||||
*/
|
*/
|
||||||
public static function getAvailableMatchConfigs(int $runnerCount, int $hunterCount): Collection
|
public static function getAvailableMatchConfigs(int $runnerCount, int $hunterCount): Collection
|
||||||
{
|
{
|
||||||
if ($hunterCount === 1 && ($runnerCount === 4 || $runnerCount === 5))
|
|
||||||
sleep(10);
|
|
||||||
|
|
||||||
return MatchConfiguration::where('runners', '<=', $runnerCount)
|
return MatchConfiguration::where('runners', '<=', $runnerCount)
|
||||||
->where('hunters', '<=', $hunterCount)
|
->where('hunters', '<=', $hunterCount)
|
||||||
->where('enabled', '=', true)
|
->where('enabled', '=', true)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user