mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
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:
parent
2cd42fb605
commit
81aa575749
7 changed files with 84 additions and 30 deletions
|
|
@ -584,7 +584,7 @@ class Level{
|
|||
$e->handlePrePlayerSearcher();
|
||||
|
||||
foreach($this->players as $player){
|
||||
$dist = ($e->x - $player->entity->x)*($e->x - $player->entity->x) + ($e->y - $player->entity->y) + ($e->z - $player->entity->z);
|
||||
$dist = ($e->x - $player->entity->x)*($e->x - $player->entity->x) + ($e->y - $player->entity->y)*($e->y - $player->entity->y) + ($e->z - $player->entity->z)*($e->z - $player->entity->z);
|
||||
$e->handlePlayerSearcher($player, $dist);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue