Idle weapon reset to baseRotation (#7825)

This commit is contained in:
MEEPofFaith 2022-11-05 04:05:55 -07:00 committed by GitHub
parent 58e9d641f0
commit e914cb59cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}