Fixed #4420 / Fixed #4418 / Fixed #4416

This commit is contained in:
Anuken 2021-01-23 10:33:06 -05:00
parent 792fdef95d
commit ad4650f408
4 changed files with 5 additions and 4 deletions

View File

@ -53,7 +53,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
} }
public void approach(Vec2 vector){ public void approach(Vec2 vector){
vel.approachDelta(vector, type.accel * realSpeed() * floorSpeedMultiplier()); vel.approachDelta(vector, type.accel * realSpeed());
} }
public void aimLook(Position pos){ public void aimLook(Position pos){
@ -82,7 +82,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
/** @return speed with boost multipliers factored in. */ /** @return speed with boost multipliers factored in. */
public float realSpeed(){ public float realSpeed(){
return Mathf.lerp(1f, type.canBoost ? type.boostMultiplier : 1f, elevation) * speed(); return Mathf.lerp(1f, type.canBoost ? type.boostMultiplier : 1f, elevation) * speed() * floorSpeedMultiplier();
} }
/** Iterates through this unit and everything it is controlling. */ /** Iterates through this unit and everything it is controlling. */

View File

@ -292,6 +292,7 @@ public class UnitType extends UnlockableContent{
if(maxRange < 0){ if(maxRange < 0){
maxRange = 0f; maxRange = 0f;
maxRange = Math.max(maxRange, range);
for(Weapon weapon : weapons){ for(Weapon weapon : weapons){
maxRange = Math.max(maxRange, weapon.bullet.range() + hitSize / 2f); maxRange = Math.max(maxRange, weapon.bullet.range() + hitSize / 2f);

View File

@ -83,7 +83,7 @@ public class Conveyor extends Block implements Autotiler{
@Override @Override
public Block getReplacement(BuildPlan req, Seq<BuildPlan> requests){ public Block getReplacement(BuildPlan req, Seq<BuildPlan> requests){
Boolf<Point2> cont = p -> requests.contains(o -> o.x == req.x + p.x && o.y == req.y + p.y && o.rotation == req.rotation && (req.block instanceof Conveyor || req.block instanceof Junction)); Boolf<Point2> cont = p -> requests.contains(o -> o.x == req.x + p.x && o.y == req.y + p.y && (req.block instanceof Conveyor || req.block instanceof Junction));
return cont.get(Geometry.d4(req.rotation)) && return cont.get(Geometry.d4(req.rotation)) &&
cont.get(Geometry.d4(req.rotation - 2)) && cont.get(Geometry.d4(req.rotation - 2)) &&
req.tile() != null && req.tile() != null &&

View File

@ -109,7 +109,7 @@ public class DesktopLauncher extends ClientLauncher{
steamError = e; steamError = e;
loadError = true; loadError = true;
Log.err(e); Log.err(e);
try(OutputStream s = new FileOutputStream(new File("steam-error-log-" + System.nanoTime() + ".txt"))){ try(OutputStream s = new FileOutputStream("steam-error-log-" + System.nanoTime() + ".txt")){
String log = Strings.neatError(e); String log = Strings.neatError(e);
s.write(log.getBytes()); s.write(log.getBytes());
}catch(Exception e2){ }catch(Exception e2){