Max players check now works properly

This now includes all connected sessions, whether they are considered online or not.
This commit is contained in:
Dylan K. Taylor
2019-01-17 21:40:10 +00:00
parent 41676cb4d4
commit 38cf8d157d
5 changed files with 26 additions and 2 deletions

View File

@ -77,6 +77,14 @@ class Network{
return $this->interfaces;
}
public function getConnectionCount() : int{
$count = 0;
foreach($this->interfaces as $interface){
$count += $interface->getConnectionCount();
}
return $count;
}
public function tick() : void{
foreach($this->interfaces as $interface){
$interface->tick();