Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ public enum Binding implements KeyBind{
|
||||
break_block(KeyCode.mouseRight),
|
||||
|
||||
select_all_units(KeyCode.g),
|
||||
select_all_unit_factories(KeyCode.h),
|
||||
|
||||
pickupCargo(KeyCode.leftBracket),
|
||||
dropCargo(KeyCode.rightBracket),
|
||||
|
||||
@@ -279,6 +279,7 @@ public class DesktopInput extends InputHandler{
|
||||
|
||||
if(commandMode && input.keyTap(Binding.select_all_units) && !scene.hasField() && !scene.hasDialog()){
|
||||
selectedUnits.clear();
|
||||
commandBuildings.clear();
|
||||
for(var unit : player.team().data().units){
|
||||
if(unit.isCommandable()){
|
||||
selectedUnits.add(unit);
|
||||
@@ -286,6 +287,16 @@ public class DesktopInput extends InputHandler{
|
||||
}
|
||||
}
|
||||
|
||||
if(commandMode && input.keyTap(Binding.select_all_unit_factories) && !scene.hasField() && !scene.hasDialog()){
|
||||
selectedUnits.clear();
|
||||
commandBuildings.clear();
|
||||
for(var build : player.team().data().buildings){
|
||||
if(build.block.commandable){
|
||||
commandBuildings.add(build);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!scene.hasMouse() && !locked && state.rules.possessionAllowed){
|
||||
if(Core.input.keyDown(Binding.control) && Core.input.keyTap(Binding.select)){
|
||||
Unit on = selectedUnit();
|
||||
|
||||
Reference in New Issue
Block a user