make turnCursor: false mechs not cross eyed (#1301)

* create new branch

* add targetDistance to weapons for mechs

players will use if turnCursor is false
This commit is contained in:
DeltaNedas
2020-01-04 17:15:43 +00:00
committed by Anuken
parent ea66d9a92f
commit 1dd0295c45
2 changed files with 3 additions and 1 deletions

View File

@@ -637,7 +637,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
if(!state.isEditor() && isShooting() && mech.canShoot(this)){
if(!mech.turnCursor){
//shoot forward ignoring cursor
mech.weapon.update(this, x + Angles.trnsx(rotation, 1f), y + Angles.trnsy(rotation, 1f));
mech.weapon.update(this, x + Angles.trnsx(rotation, mech.weapon.targetDistance), y + Angles.trnsy(rotation, mech.weapon.targetDistance));
}else{
mech.weapon.update(this, pointerX, pointerY);
}