mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 23:28:52 +07:00
Fixed major issue with Vector2.ZERO mutation
This commit is contained in:
parent
d58cc18136
commit
5c4ac6b702
@ -53,9 +53,6 @@ public class Predict{
|
||||
* See {@link #intercept(float, float, float, float, float, float, float)}.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user