small fixes for new physics, still buggy, needs collision checking

This commit is contained in:
GameHerobrine 2022-06-26 13:53:23 +03:00
parent f9a11b5eba
commit faeb22205f
2 changed files with 34 additions and 17 deletions

View file

@ -1692,7 +1692,6 @@ class Player{
case 5: //Shot arrow
if($this->entity->inAction === true){
if($this->getSlot($this->slot)->getID() === BOW){
console($this->getSlot($this->slot)->getMetadata());
if($this->startAction !== false){
$time = microtime(true) - $this->startAction;
$d = array(
@ -1706,8 +1705,7 @@ class Player{
$e->speedX = -sin(($e->yaw / 180) * M_PI) * cos(($e->pitch / 180) * M_PI);
$e->speedZ = cos(($e->yaw / 180) * M_PI) * cos(($e->pitch / 180) * M_PI);
$e->speedY = -sin(($e->pitch / 180) * M_PI);
$e->shoot($e->speedX, $e->speedY, $e->speedZ, 1.5*2, 1.0);
console($e->yaw);
$e->shoot($e->speedX, $e->speedY, $e->speedZ, 1.5, 1.0);
$this->server->api->entity->spawnToAll($e);
}
}