Critical arrows, fixed arrow interception calculation

This commit is contained in:
Shoghi Cervantes
2015-03-28 17:54:10 +01:00
parent 0a85ad0d1f
commit e0a6d0feab
8 changed files with 40 additions and 18 deletions

View File

@ -274,7 +274,12 @@ class AxisAlignedBB{
$v6 = null;
}
$vector = $v1;
$vector = null;
if($v1 !== null and ($vector === null or $pos1->distanceSquared($v1) < $pos1->distanceSquared($vector))){
$vector = $v1;
}
if($v2 !== null and ($vector === null or $pos1->distanceSquared($v2) < $pos1->distanceSquared($vector))){
$vector = $v2;