Removed some calls

This commit is contained in:
Shoghi Cervantes 2014-10-31 15:57:07 +01:00
parent 094b600a0c
commit f8d6ebabf3
3 changed files with 6 additions and 6 deletions

View File

@ -422,7 +422,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$this->port = $port; $this->port = $port;
$this->clientID = $clientID; $this->clientID = $clientID;
$this->chunksPerTick = (int) $this->server->getProperty("chunk-sending.per-tick", 4); $this->chunksPerTick = (int) $this->server->getProperty("chunk-sending.per-tick", 4);
$this->spawnPosition = $this->server->getDefaultLevel()->getSafeSpawn(); $this->spawnPosition = null;
$this->gamemode = $this->server->getGamemode(); $this->gamemode = $this->server->getGamemode();
$this->setLevel($this->server->getDefaultLevel(), true); $this->setLevel($this->server->getDefaultLevel(), true);
$this->viewDistance = $this->server->getViewDistance(); $this->viewDistance = $this->server->getViewDistance();
@ -1898,7 +1898,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
} }
} }
$damage[EntityDamageEvent::MODIFIER_ARMOR] = -intval($damage[EntityDamageEvent::MODIFIER_BASE] * $points * 0.04); $damage[EntityDamageEvent::MODIFIER_ARMOR] = -floor($damage[EntityDamageEvent::MODIFIER_BASE] * $points * 0.04);
} }
$ev = EntityDamageByEntityEvent::createEvent($this, $target, EntityDamageEvent::CAUSE_ENTITY_ATTACK, $damage); $ev = EntityDamageByEntityEvent::createEvent($this, $target, EntityDamageEvent::CAUSE_ENTITY_ATTACK, $damage);
@ -2597,7 +2597,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$pk = MovePlayerPacket::getFromPool(); $pk = MovePlayerPacket::getFromPool();
$pk->eid = 0; $pk->eid = 0;
$pk->x = $this->x; $pk->x = $this->x;
$pk->y = $this->y + $this->getEyeHeight() + 0.01; $pk->y = $this->y + $this->getEyeHeight();
$pk->z = $this->z; $pk->z = $this->z;
$pk->bodyYaw = $this->yaw; $pk->bodyYaw = $this->yaw;
$pk->pitch = $this->pitch; $pk->pitch = $this->pitch;

View File

@ -171,11 +171,11 @@ abstract class DataPacket extends \stdClass{
protected function getLTriad(){ protected function getLTriad(){
return Binary::readTriad(strrev($this->get(3))); return Binary::readLTriad($this->get(3));
} }
protected function putLTriad($v){ protected function putLTriad($v){
$this->buffer .= strrev(Binary::writeTriad($v)); $this->buffer .= Binary::writeLTriad($v);
} }
protected function getByte(){ protected function getByte(){

@ -1 +1 @@
Subproject commit 9d4f0ea7c58e34883fb8a6057894e2b4920fd7d3 Subproject commit 8b8d35607971a7ac48354156f9d7c466094c7e98