mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-18 19:57:59 +07:00
Fixed major issue with Vector2.ZERO mutation
This commit is contained in:
@ -53,9 +53,6 @@ public class Predict{
|
|||||||
* See {@link #intercept(float, float, float, float, float, float, float)}.
|
* See {@link #intercept(float, float, float, float, float, float, float)}.
|
||||||
*/
|
*/
|
||||||
public static Vector2 intercept(TargetTrait src, TargetTrait dst, float v){
|
public static Vector2 intercept(TargetTrait src, TargetTrait dst, float v){
|
||||||
if(vec.set(dst.getVelocity().sub(src.getVelocity())).isZero()){
|
|
||||||
return vresult.set(dst.getX(), dst.getY());
|
|
||||||
}
|
|
||||||
return intercept(src.getX(), src.getY(), dst.getX(), dst.getY(), dst.getVelocity().x - src.getVelocity().x, dst.getVelocity().x - src.getVelocity().y, v);
|
return intercept(src.getX(), src.getY(), dst.getX(), dst.getY(), dst.getVelocity().x - src.getVelocity().x, dst.getVelocity().x - src.getVelocity().y, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user