mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 23:28:52 +07:00
Idle weapon reset to baseRotation (#7825)
This commit is contained in:
parent
58e9d641f0
commit
e914cb59cd
@ -179,9 +179,9 @@ public class AIController implements UnitController{
|
||||
|
||||
unit.isShooting |= (mount.shoot = mount.rotate = shoot);
|
||||
|
||||
if(mount.target == null && !shoot && !Angles.within(mount.rotation, 0f, 0.01f) && noTargetTime >= rotateBackTimer){
|
||||
if(mount.target == null && !shoot && !Angles.within(mount.rotation, mount.weapon.baseRotation, 0.01f) && noTargetTime >= rotateBackTimer){
|
||||
mount.rotate = true;
|
||||
Tmp.v1.trns(unit.rotation, 5f);
|
||||
Tmp.v1.trns(unit.rotation + mount.weapon.baseRotation, 5f);
|
||||
mount.aimX = mountX + Tmp.v1.x;
|
||||
mount.aimY = mountY + Tmp.v1.y;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user