BuildWeapon fixe (#10339)

This commit is contained in:
Elixias 2024-11-20 10:44:32 -07:00 committed by GitHub
parent b6569f91de
commit 650d008fcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,7 +38,7 @@ public class BuildWeapon extends Weapon{
mount.aimY = unit.buildPlan().drawy();
}else{
//aim for front
float weaponRotation = unit.rotation - 90;
float weaponRotation = unit.rotation - 90 + baseRotation;
mount.aimX = unit.x + Angles.trnsx(unit.rotation - 90, x, y) + Angles.trnsx(weaponRotation, this.shootX, this.shootY);
mount.aimY = unit.y + Angles.trnsy(unit.rotation - 90, x, y) + Angles.trnsy(weaponRotation, this.shootX, this.shootY);
}