Fixed memory tracking error

This commit is contained in:
Shoghi Cervantes 2013-06-08 18:26:24 +02:00
parent 3061b8eb3c
commit 5f40ab84f0

View File

@ -116,7 +116,8 @@ class PocketMinecraftServer{
public function checkMemory(){ public function checkMemory(){
$info = $this->debugInfo(); $info = $this->debugInfo();
$data = $info["memory_usage"].",".$info["players"].",".$info["entities"]; $data = $info["memory_usage"].",".$info["players"].",".$info["entities"];
if($this->memoryStats[count($this->memoryStats) - 1] !== $data){ $i = count($this->memoryStats) - 1;
if($i > -1 and $this->memoryStats[$i] !== $data){
$this->memoryStats[] = $data; $this->memoryStats[] = $data;
} }
} }