mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 02:37:12 +07:00
Stop shooting upon crawler death
This commit is contained in:
parent
d512aa5b21
commit
9142da2b70
@ -190,14 +190,10 @@ public class EntityCollisions{
|
||||
yInvExit = y2 - (y1 + h1);
|
||||
}
|
||||
|
||||
float xEntry, yEntry;
|
||||
float xExit, yExit;
|
||||
|
||||
xEntry = xInvEntry / vx1;
|
||||
xExit = xInvExit / vx1;
|
||||
|
||||
yEntry = yInvEntry / vy1;
|
||||
yExit = yInvExit / vy1;
|
||||
float xEntry = xInvEntry / vx1;
|
||||
float xExit = xInvExit / vx1;
|
||||
float yEntry = yInvEntry / vy1;
|
||||
float yExit = yInvExit / vy1;
|
||||
|
||||
float entryTime = Math.max(xEntry, yEntry);
|
||||
float exitTime = Math.min(xExit, yExit);
|
||||
|
@ -68,6 +68,14 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
public Seq<BuildPlan> lineRequests = new Seq<>();
|
||||
public Seq<BuildPlan> selectRequests = new Seq<>();
|
||||
|
||||
public InputHandler(){
|
||||
Events.on(UnitDestroyEvent.class, e -> {
|
||||
if(e.unit != null && e.unit.isPlayer() && e.unit.getPlayer().isLocal() && e.unit.type.weapons.contains(w -> w.bullet.killShooter)){
|
||||
player.shooting = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//methods to override
|
||||
|
||||
@Remote(called = Loc.server, unreliable = true)
|
||||
|
@ -23,7 +23,7 @@ import java.util.regex.*;
|
||||
public class Scripts implements Disposable{
|
||||
private final Seq<String> blacklist = Seq.with(".net.", "java.net", "files", "reflect", "javax", "rhino", "file", "channels", "jdk",
|
||||
"runtime", "util.os", "rmi", "security", "org.", "sun.", "beans", "sql", "http", "exec", "compiler", "process", "system",
|
||||
".awt", "socket", "classloader", "oracle", "invoke", "java.util.function", "java.util.stream", "org.");
|
||||
".awt", "socket", "classloader", "oracle", "invoke", "java.util.function", "java.util.stream", "org.", "arc.net");
|
||||
private final Seq<String> whitelist = Seq.with("mindustry.net", "netserver", "netclient", "com.sun.proxy.$proxy", "mindustry.gen.", "mindustry.logic.", "mindustry.async.", "saveio", "systemcursor");
|
||||
private final Context context;
|
||||
private final Scriptable scope;
|
||||
|
Loading…
Reference in New Issue
Block a user