Player::teleport will set motion to 0, fixed possible divby0 when skeletonm shooting the player, fixed entities not untargetting dead players, fixed wrong distance calculations

This commit is contained in:
GameHerobrine 2024-07-12 17:50:06 +03:00
parent 2cd42fb605
commit 81aa575749
7 changed files with 84 additions and 30 deletions

View file

@ -298,7 +298,14 @@ class Player{
$this->forceMovement = $pos;
}
}
$pk = new SetEntityMotionPacket();
$pk->eid = 0;
$pk->speedX = 0;
$pk->speedY = 0;
$pk->speedZ = 0;
$this->dataPacket($pk);
$pk = new MovePlayerPacket;
$pk->eid = 0;
$pk->x = $pos->x;