郑晓宇 6 lat temu
rodzic
commit
6b9c2d85d2
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      app/Console/Commands/gamematch.php

+ 3 - 2
app/Console/Commands/gamematch.php

@@ -130,13 +130,14 @@ class gamematch extends Command
                 ];
                 Gateway::sendToGroup($room_id, json_encode($message));
                 echo "玩家加入房间: {$user_id}\n";
+                var_dump($group_users);
                 //判断对战是否开启标志
-                if(count($group_users) == $room->user_limit){
+                // if(count($group_users) == $room->user_limit){
                     unset($update_data);
                     $update_data['is_full'] = 1;
                     $update_data['start_at'] = date('Y-m-d H:i:s');
                     Room::where("room_id", $room_id)->update($update_data);
-                }
+                // }
 
                 //执行发题
                 Distribute::dispatch($room_id)->onQueue('distribute');