mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-18 17:34:11 +00:00
Merge pull request #2827 from PEMapModder/patch-3
Removed useless code in Entity::getDirectionVector()
This commit is contained in:
commit
45c6694ef9
@ -631,9 +631,6 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
* @return Vector3
|
* @return Vector3
|
||||||
*/
|
*/
|
||||||
public function getDirectionVector(){
|
public function getDirectionVector(){
|
||||||
$pitch = ($this->pitch * M_PI) / 180;
|
|
||||||
$yaw = (($this->yaw + 90) * M_PI) / 180;
|
|
||||||
|
|
||||||
$y = -sin(deg2rad($this->pitch));
|
$y = -sin(deg2rad($this->pitch));
|
||||||
$xz = cos(deg2rad($this->pitch));
|
$xz = cos(deg2rad($this->pitch));
|
||||||
$x = -$xz * sin(deg2rad($this->yaw));
|
$x = -$xz * sin(deg2rad($this->yaw));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user