small change to packet sending method, entities are spawning again, raised mob spawner limit to 50

This commit is contained in:
GameHerobrine 2022-12-20 20:29:17 +03:00
parent d9c096357a
commit ddc7bea48b
4 changed files with 14 additions and 7 deletions

View file

@ -50,6 +50,6 @@ class UDPSocket{
return false;
}
return @socket_sendto($this->sock, $data, strlen($data), 0, $dest, $port);
return socket_sendto($this->sock, $data, strlen($data), MSG_DONTROUTE, $dest, $port);
}
}

View file

@ -13,7 +13,13 @@ class MoveEntityPacket_PosRot extends RakNetDataPacket{
}
public function decode(){
$this->get(7);
$this->eid = $this->getInt();
$this->x = $this->getFloat();
$this->y = $this->getFloat();
$this->z = $this->getFloat();
$this->yaw = $this->getFloat();
$this->pitch = $this->getFloat();
}
public function encode(){

View file

@ -15,7 +15,9 @@ class RotateHeadPacket extends RakNetDataPacket{
}
public function decode(){
$this->get(7); //id + data
$this->eid = $this->getInt();
$this->yaw = $this->getByte();
}
public function encode(){