Lots of typos fixed, undefined variables, unused code

This commit is contained in:
Shoghi Cervantes
2014-02-19 01:55:42 +01:00
parent 3d3111fef6
commit f1b5f83fd4
35 changed files with 63 additions and 251 deletions

View File

@@ -222,7 +222,6 @@ class Player{
$Y = $id[1];
$x = $X << 4;
$z = $Z << 4;
$y = $Y << 4;
$this->level->useChunk($X, $Z, $this);
$Yndex = 1 << $Y;
for($iY = 0; $iY < 8; ++$iY){
@@ -328,7 +327,7 @@ class Player{
$this->chunksLoaded = array();
$this->chunksOrder = array();
$this->chunkCount = array();
$this->cratingItems = array();
$this->craftingItems = array();
$this->received = array();
}
}
@@ -698,11 +697,10 @@ class Player{
return;
}else{
$message = $data->get();
$this->sendChat(preg_replace('/\x1b\[[0-9;]*m/', "", $message["message"]), $message["player"]); //Remove ANSI codes from chat
$this->sendChat($message["message"], $message["player"]);
}
}else{
$message = (string) $data;
$this->sendChat(preg_replace('/\x1b\[[0-9;]*m/', "", (string) $data)); //Remove ANSI codes from chat
$this->sendChat((string) $data);
}
break;
}
@@ -1377,8 +1375,8 @@ class Player{
$inv[] = array($item[0], $item[1], 1);
}
}
$this->data->set("inventory", $inv);
}
$this->data->set("inventory", $inv);
}
$this->achievements = $this->data->get("achievements");
$this->data->set("caseusername", $this->username);
@@ -2007,6 +2005,7 @@ class Player{
$packet->item = $this->getSlot($this->slot);
$this->craftingItems = array();
$this->toCraft = array();
$data = array();
$data["eid"] = $packet->eid;
$data["unknown"] = $packet->unknown;
$data["item"] = $packet->item;
@@ -2374,7 +2373,7 @@ class Player{
return $cnts;
}
public function directDataPacket(RakNetDataPacket $packet, $reliability = 0, $recover = true){
public function directDataPacket(RakNetDataPacket $packet, $recover = true){
if($this->connected === false){
return false;
}
@@ -2382,7 +2381,6 @@ class Player{
if(EventHandler::callEvent(new DataPacketSendEvent($this, $packet)) === BaseEvent::DENY){
return array();
}
$packet->encode();
$pk = new RakNetPacket(RakNetInfo::DATA_PACKET_0);
$pk->data[] = $packet;