Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -60,8 +60,8 @@ public class CargoAI extends AIController{
|
||||
}
|
||||
}else{
|
||||
|
||||
//what if some prankster reconfigures the source while the unit is moving? we can't have that!
|
||||
if(unloadTarget.item != itemTarget){
|
||||
//what if some prankster reconfigures or picks up the target while the unit is moving? we can't have that!
|
||||
if(unloadTarget.item != itemTarget || unloadTarget.isPayload()){
|
||||
unloadTarget = null;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -315,8 +315,8 @@ public class AIController implements UnitController{
|
||||
vec.setLength(unit.speed() * length);
|
||||
}
|
||||
|
||||
//do not move when infinite vectors are used.
|
||||
if(vec.isNaN() || vec.isInfinite()) return;
|
||||
//do not move when infinite vectors are used or if its zero.
|
||||
if(vec.isNaN() || vec.isInfinite() || vec.isZero()) return;
|
||||
|
||||
if(!unit.type.omniMovement && unit.type.rotateMoveFirst){
|
||||
float angle = vec.angle();
|
||||
|
||||
Reference in New Issue
Block a user