always check what u remove

This commit is contained in:
GameHerobrine 2023-08-21 02:44:05 +03:00
parent 9845fb6013
commit f5f7037b2d

View file

@ -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;