mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Merge branch 'stable' into next-minor
This commit is contained in:
commit
0ae2c6302a
6
.gitignore
vendored
6
.gitignore
vendored
@ -41,3 +41,9 @@ test_data/*
|
||||
|
||||
# Doxygen
|
||||
Documentation/*
|
||||
|
||||
# PHPUnit
|
||||
/.phpunit.result.cache
|
||||
|
||||
# php-cs-fixer
|
||||
/.php_cs.cache
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit d475b694e4889e403fe430b88be9f535b7d4af02
|
||||
Subproject commit 0aa88d27659c7fa91cb467547fde12dca926529b
|
@ -1379,9 +1379,16 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
if($this->isSpectator()){
|
||||
$this->setFlying(true);
|
||||
$this->keepMovement = true;
|
||||
$this->onGround = false;
|
||||
|
||||
//TODO: HACK! this syncs the onground flag with the client so that flying works properly
|
||||
//this is a yucky hack but we don't have any other options :(
|
||||
$this->sendPosition($this, null, null, MovePlayerPacket::MODE_TELEPORT);
|
||||
|
||||
$this->despawnFromAll();
|
||||
}else{
|
||||
$this->keepMovement = $this->allowMovementCheats;
|
||||
$this->checkGroundState(0, 0, 0, 0, 0, 0);
|
||||
if($this->isSurvival()){
|
||||
$this->setFlying(false);
|
||||
}
|
||||
@ -1502,11 +1509,15 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
}
|
||||
|
||||
protected function checkGroundState(float $movX, float $movY, float $movZ, float $dx, float $dy, float $dz) : void{
|
||||
$bb = clone $this->boundingBox;
|
||||
$bb->minY = $this->y - 0.2;
|
||||
$bb->maxY = $this->y + 0.2;
|
||||
if($this->isSpectator()){
|
||||
$this->onGround = false;
|
||||
}else{
|
||||
$bb = clone $this->boundingBox;
|
||||
$bb->minY = $this->y - 0.2;
|
||||
$bb->maxY = $this->y + 0.2;
|
||||
|
||||
$this->onGround = $this->isCollided = count($this->level->getCollisionBlocks($bb, true)) > 0;
|
||||
$this->onGround = $this->isCollided = count($this->level->getCollisionBlocks($bb, true)) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
public function canBeMovedByCurrents() : bool{
|
||||
|
@ -2092,17 +2092,24 @@ class Server{
|
||||
|
||||
if($report){
|
||||
$url = ((bool) $this->getProperty("auto-report.use-https", true) ? "https" : "http") . "://" . $this->getProperty("auto-report.host", "crash.pmmp.io") . "/submit/api";
|
||||
$postUrlError = "Unknown error";
|
||||
$reply = Internet::postURL($url, [
|
||||
"report" => "yes",
|
||||
"name" => $this->getName() . " " . $this->getPocketMineVersion(),
|
||||
"email" => "crash@pocketmine.net",
|
||||
"reportPaste" => base64_encode($dump->getEncodedData())
|
||||
]);
|
||||
], 10, [], $postUrlError);
|
||||
|
||||
if($reply !== false and ($data = json_decode($reply)) !== null and isset($data->crashId) and isset($data->crashUrl)){
|
||||
$reportId = $data->crashId;
|
||||
$reportUrl = $data->crashUrl;
|
||||
$this->logger->emergency($this->getLanguage()->translateString("pocketmine.crash.archive", [$reportUrl, $reportId]));
|
||||
if($reply !== false and ($data = json_decode($reply)) !== null){
|
||||
if(isset($data->crashId) and isset($data->crashUrl)){
|
||||
$reportId = $data->crashId;
|
||||
$reportUrl = $data->crashUrl;
|
||||
$this->logger->emergency($this->getLanguage()->translateString("pocketmine.crash.archive", [$reportUrl, $reportId]));
|
||||
}elseif(isset($data->error)){
|
||||
$this->logger->emergency("Automatic crash report submission failed: $data->error");
|
||||
}
|
||||
}else{
|
||||
$this->logger->emergency("Failed to communicate with crash archive: $postUrlError");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1868,7 +1868,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
$this->setMotion($this->temporalVector->setComponents(0, 0, 0));
|
||||
if($this->setPositionAndRotation($pos, $yaw ?? $this->yaw, $pitch ?? $this->pitch)){
|
||||
$this->resetFallDistance();
|
||||
$this->onGround = true;
|
||||
$this->setForceMovementUpdate();
|
||||
|
||||
$this->updateMovement(true);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user