mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
always check what u remove
This commit is contained in:
parent
9845fb6013
commit
f5f7037b2d
1 changed files with 4 additions and 4 deletions
|
|
@ -1048,7 +1048,7 @@ class Entity extends Position
|
||||||
$angle = Utils::angle3D($pos2, $pos);
|
$angle = Utils::angle3D($pos2, $pos);
|
||||||
$this->yaw = $angle["yaw"];
|
$this->yaw = $angle["yaw"];
|
||||||
$this->pitch = $angle["pitch"];
|
$this->pitch = $angle["pitch"];
|
||||||
//$this->server->query("UPDATE entities SET pitch = " . $this->pitch . ", yaw = " . $this->yaw . " WHERE EID = " . $this->eid . ";");
|
$this->server->query("UPDATE entities SET pitch = " . $this->pitch . ", yaw = " . $this->yaw . " WHERE EID = " . $this->eid . ";");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function move(Vector3 $pos, $yaw = 0, $pitch = 0)
|
public function move(Vector3 $pos, $yaw = 0, $pitch = 0)
|
||||||
|
|
@ -1060,7 +1060,7 @@ class Entity extends Position
|
||||||
$this->yaw %= 360;
|
$this->yaw %= 360;
|
||||||
$this->pitch += $pitch;
|
$this->pitch += $pitch;
|
||||||
$this->pitch %= 90;
|
$this->pitch %= 90;
|
||||||
//$this->server->query("UPDATE entities SET x = " . $this->x . ", y = " . $this->y . ", z = " . $this->z . ", pitch = " . $this->pitch . ", yaw = " . $this->yaw . " WHERE EID = " . $this->eid . ";");
|
$this->server->query("UPDATE entities SET x = " . $this->x . ", y = " . $this->y . ", z = " . $this->z . ", pitch = " . $this->pitch . ", yaw = " . $this->yaw . " WHERE EID = " . $this->eid . ";");
|
||||||
$this->updateAABB();
|
$this->updateAABB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1074,7 +1074,7 @@ class Entity extends Position
|
||||||
|
|
||||||
public function updatePosition()
|
public function updatePosition()
|
||||||
{
|
{
|
||||||
//$this->server->query("UPDATE entities SET level = '" . $this->level->getName() . "', x = " . $this->x . ", y = " . $this->y . ", z = " . $this->z . ", pitch = " . $this->pitch . ", yaw = " . $this->yaw . " WHERE EID = " . $this->eid . ";");
|
$this->server->query("UPDATE entities SET level = '" . $this->level->getName() . "', x = " . $this->x . ", y = " . $this->y . ", z = " . $this->z . ", pitch = " . $this->pitch . ", yaw = " . $this->yaw . " WHERE EID = " . $this->eid . ";");
|
||||||
$this->sendMoveUpdate();
|
$this->sendMoveUpdate();
|
||||||
// $this->sendMotion();
|
// $this->sendMotion();
|
||||||
$this->updateAABB();
|
$this->updateAABB();
|
||||||
|
|
@ -1372,7 +1372,7 @@ class Entity extends Position
|
||||||
"cause" => $cause
|
"cause" => $cause
|
||||||
)) !== false or $force === true){
|
)) !== false or $force === true){
|
||||||
$this->health = min(127, max(- 127, $health));
|
$this->health = min(127, max(- 127, $health));
|
||||||
//$this->server->query("UPDATE entities SET health = " . $this->health . " WHERE EID = " . $this->eid . ";");
|
$this->server->query("UPDATE entities SET health = " . $this->health . " WHERE EID = " . $this->eid . ";");
|
||||||
if($harm === true){
|
if($harm === true){
|
||||||
$pk = new EntityEventPacket;
|
$pk = new EntityEventPacket;
|
||||||
$pk->eid = $this->eid;
|
$pk->eid = $this->eid;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue