Fixed revenant never shooting
This commit is contained in:
@@ -5072,7 +5072,7 @@ item-lead
|
|||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
item-phase-matter
|
item-phase-fabric
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 876, 344
|
xy: 876, 344
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
@@ -52,7 +52,6 @@ public class UnitTypes implements ContentList{
|
|||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
hitsize = 8f;
|
hitsize = 8f;
|
||||||
mass = 1.75f;
|
mass = 1.75f;
|
||||||
range = 40f;
|
|
||||||
weapon = Weapons.chainBlaster;
|
weapon = Weapons.chainBlaster;
|
||||||
health = 130;
|
health = 130;
|
||||||
}};
|
}};
|
||||||
@@ -62,7 +61,6 @@ public class UnitTypes implements ContentList{
|
|||||||
speed = 0.18f;
|
speed = 0.18f;
|
||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
mass = 3.5f;
|
mass = 3.5f;
|
||||||
range = 10f;
|
|
||||||
hitsize = 9f;
|
hitsize = 9f;
|
||||||
rotatespeed = 0.1f;
|
rotatespeed = 0.1f;
|
||||||
weapon = Weapons.flamethrower;
|
weapon = Weapons.flamethrower;
|
||||||
@@ -75,7 +73,6 @@ public class UnitTypes implements ContentList{
|
|||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
mass = 5f;
|
mass = 5f;
|
||||||
hitsize = 10f;
|
hitsize = 10f;
|
||||||
range = 10f;
|
|
||||||
rotatespeed = 0.06f;
|
rotatespeed = 0.06f;
|
||||||
weaponOffsetX = 1;
|
weaponOffsetX = 1;
|
||||||
targetAir = false;
|
targetAir = false;
|
||||||
@@ -111,6 +108,7 @@ public class UnitTypes implements ContentList{
|
|||||||
speed = 0.14f;
|
speed = 0.14f;
|
||||||
maxVelocity = 1.3f;
|
maxVelocity = 1.3f;
|
||||||
drag = 0.01f;
|
drag = 0.01f;
|
||||||
|
range = 80f;
|
||||||
isFlying = true;
|
isFlying = true;
|
||||||
weapon = Weapons.laserBurster;
|
weapon = Weapons.laserBurster;
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void targetClosest(){
|
public void targetClosest(){
|
||||||
target = Units.getClosestTarget(team, x, y, getWeapon().getAmmo().getRange(), u -> type.targetAir || !u.isFlying());
|
target = Units.getClosestTarget(team, x, y, Math.max(getWeapon().getAmmo().getRange(), type.range), u -> type.targetAir || !u.isFlying());
|
||||||
}
|
}
|
||||||
|
|
||||||
public TileEntity getClosestEnemyCore(){
|
public TileEntity getClosestEnemyCore(){
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
|||||||
attack(150f);
|
attack(150f);
|
||||||
|
|
||||||
if((Mathf.angNear(angleTo(target), rotation, 15f) || !getWeapon().getAmmo().bullet.keepVelocity) //bombers don't care about rotation
|
if((Mathf.angNear(angleTo(target), rotation, 15f) || !getWeapon().getAmmo().bullet.keepVelocity) //bombers don't care about rotation
|
||||||
&& distanceTo(target) < getWeapon().getAmmo().getRange()){
|
&& distanceTo(target) < Math.max(getWeapon().getAmmo().getRange(), type.range)){
|
||||||
AmmoType ammo = getWeapon().getAmmo();
|
AmmoType ammo = getWeapon().getAmmo();
|
||||||
|
|
||||||
Vector2 to = Predict.intercept(FlyingUnit.this, target, ammo.bullet.speed);
|
Vector2 to = Predict.intercept(FlyingUnit.this, target, ammo.bullet.speed);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
public float hitsize = 7f;
|
public float hitsize = 7f;
|
||||||
public float hitsizeTile = 4f;
|
public float hitsizeTile = 4f;
|
||||||
public float speed = 0.4f;
|
public float speed = 0.4f;
|
||||||
public float range = 160;
|
public float range = 0;
|
||||||
public float rotatespeed = 0.2f;
|
public float rotatespeed = 0.2f;
|
||||||
public float baseRotateSpeed = 0.1f;
|
public float baseRotateSpeed = 0.1f;
|
||||||
public float mass = 1f;
|
public float mass = 1f;
|
||||||
|
|||||||
Reference in New Issue
Block a user