mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 07:17:19 +07:00
Fixed units not rotating to target
This commit is contained in:
@ -14,7 +14,7 @@ import static io.anuke.mindustry.Vars.groundEffectGroup;
|
|||||||
* Class for creating block rubble on the ground.
|
* Class for creating block rubble on the ground.
|
||||||
*/
|
*/
|
||||||
public abstract class Decal extends TimedEntity implements BelowLiquidTrait, DrawTrait{
|
public abstract class Decal extends TimedEntity implements BelowLiquidTrait, DrawTrait{
|
||||||
private static final Color color = Color.valueOf("2c2928");
|
private static final Color color = Color.valueOf("3a3635");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float lifetime(){
|
public float lifetime(){
|
||||||
|
@ -265,7 +265,9 @@ public abstract class GroundUnit extends BaseUnit{
|
|||||||
float angle = angleTo(targetTile);
|
float angle = angleTo(targetTile);
|
||||||
|
|
||||||
velocity.add(vec.trns(angleTo(targetTile), type.speed*Time.delta()));
|
velocity.add(vec.trns(angleTo(targetTile), type.speed*Time.delta()));
|
||||||
rotation = Mathf.slerpDelta(rotation, angle, type.rotatespeed);
|
if(Units.invalidateTarget(target, this)){
|
||||||
|
rotation = Mathf.slerpDelta(rotation, angle, type.rotatespeed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void moveAwayFromCore(){
|
protected void moveAwayFromCore(){
|
||||||
|
Reference in New Issue
Block a user