Skip to content

Commit

Permalink
Fixed #217
Browse files Browse the repository at this point in the history
  • Loading branch information
tltneon committed Aug 28, 2024
1 parent 20a456b commit 456ba38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lgsl_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,8 @@ public function updateValues(&$data) {
$this->_extra = array_merge($this->_extra, $data['e'] ?? []);
$this->_other = array_merge($this->_other, $data['o'] ?? []);
$this->_server = array_merge($this->_server, $data['s'] ?? []);
if ($this->isOnline()) {
if (is_array($data['p']) && count($data['p']) > 0) {
if (is_array($data['p'])) {
if (count($data['p']) > 0) {
$this->_players = $data['p'];
}
} else {
Expand Down
1 change: 0 additions & 1 deletion src/lgsl_protocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,6 @@ public function process() {
$this->_data['p'][$player_key]['time'] = Helper::lgslTime($buffer->cutByteUnpack(4, "f"));
$player_key ++;
}
var_dump($this->_data['p']);
$this->need('p');
} elseif ($response_type === "E") { // SOURCE AND HALF-LIFE 1 RULES
$buffer->skip(2);
Expand Down

0 comments on commit 456ba38

Please sign in to comment.