From 369d06bf7751cac028f5ce26b3a11372fcdc3f00 Mon Sep 17 00:00:00 2001 From: Jacek Maciejak <18230443+RikoDEV@users.noreply.github.com> Date: Fri, 24 May 2024 21:24:45 +0200 Subject: [PATCH] Fix Rust (https://github.com/Austinb/GameQ/pull/716) --- src/GameQ/Protocols/Rust.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/GameQ/Protocols/Rust.php b/src/GameQ/Protocols/Rust.php index 356cc19f..5d284afb 100644 --- a/src/GameQ/Protocols/Rust.php +++ b/src/GameQ/Protocols/Rust.php @@ -42,23 +42,12 @@ class Rust extends Source * @type string */ protected $name_long = "Rust"; - + /** - * Overload so we can get max players from mp of keywords and num players from cp keyword + * query_port = client_port + 1 * - * @param Buffer $buffer + * @type int */ - protected function processDetails(Buffer $buffer) - { - $results = parent::processDetails($buffer); - - if ($results['keywords']) { - //get max players from mp of keywords and num players from cp keyword - preg_match_all('/(mp|cp)([\d]+)/', $results['keywords'], $matches); - $results['max_players'] = intval($matches[2][0]); - $results['num_players'] = intval($matches[2][1]); - } + protected $port_diff = 1; - return $results; - } }