0.8.0 partial compatibility

* Not compatible with Creative mode
This commit is contained in:
Shoghi Cervantes
2013-11-23 13:52:13 +01:00
parent 3d53b9eb3a
commit ba7c9503d8
5 changed files with 75 additions and 130 deletions

View File

@@ -852,8 +852,9 @@ class Player{
"x" => $pos->x,
"y" => $pos->y,
"z" => $pos->z,
"yaw" => $yaw,
"bodyYaw" => $yaw,
"pitch" => $pitch,
"yaw" => $yaw,
));
}
@@ -1310,6 +1311,20 @@ class Player{
break;
}
break;
case MC_ROTATE_HEAD:
if($this->spawned === false){
break;
}
if(($this->entity instanceof Entity)){
if($this->blocked === true or $this->server->api->handle("player.move", $this->entity) === false){
if($this->lastCorrect instanceof Vector3){
$this->teleport($this->lastCorrect, $this->entity->yaw, $this->entity->pitch, false);
}
}else{
$this->entity->setPosition($this->entity, $data["yaw"], $data["pitch"]);
}
}
break;
case MC_MOVE_PLAYER:
if($this->spawned === false){
break;
@@ -1340,7 +1355,6 @@ class Player{
if($this->spawned === false){
break;
}
$data["eid"] = $this->eid;
$data["player"] = $this;