Fixed #9892
This commit is contained in:
@@ -16,7 +16,7 @@ public class EntityCollisions{
|
|||||||
|
|
||||||
//tile collisions
|
//tile collisions
|
||||||
private Vec2 vector = new Vec2(), l1 = new Vec2();
|
private Vec2 vector = new Vec2(), l1 = new Vec2();
|
||||||
private Rect r1 = new Rect(), r2 = new Rect(), r3 = new Rect(), r4 = new Rect(), tmp = new Rect();
|
private Rect r1 = new Rect(), r2 = new Rect(), tmp = new Rect();
|
||||||
|
|
||||||
//entity collisions
|
//entity collisions
|
||||||
private Seq<Hitboxc> arrOut = new Seq<>(Hitboxc.class);
|
private Seq<Hitboxc> arrOut = new Seq<>(Hitboxc.class);
|
||||||
@@ -218,12 +218,12 @@ public class EntityCollisions{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateCollision(Hitboxc solid){
|
private void updateCollision(Hitboxc solid){
|
||||||
solid.hitbox(r3);
|
solid.hitbox(r1);
|
||||||
r3.x += (solid.lastX() - solid.getX());
|
r1.x += (solid.lastX() - solid.getX());
|
||||||
r3.y += (solid.lastY() - solid.getY());
|
r1.y += (solid.lastY() - solid.getY());
|
||||||
|
|
||||||
solid.hitbox(r4);
|
solid.hitbox(r2);
|
||||||
r4.merge(r3);
|
r2.merge(r1);
|
||||||
|
|
||||||
arrOut.clear();
|
arrOut.clear();
|
||||||
|
|
||||||
@@ -235,8 +235,8 @@ public class EntityCollisions{
|
|||||||
|
|
||||||
for(int i = 0; i < size; i++){
|
for(int i = 0; i < size; i++){
|
||||||
Hitboxc sc = items[i];
|
Hitboxc sc = items[i];
|
||||||
sc.hitbox(r3);
|
sc.hitbox(r1);
|
||||||
if(r4.overlaps(r3)){
|
if(r2.overlaps(r1)){
|
||||||
checkCollide(solid, sc);
|
checkCollide(solid, sc);
|
||||||
//break out of loop when this object hits something
|
//break out of loop when this object hits something
|
||||||
if(!solid.isAdded()) return;
|
if(!solid.isAdded()) return;
|
||||||
|
|||||||
@@ -628,7 +628,7 @@ public class TypeIO{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static KickReason readKick(Reads read){
|
public static KickReason readKick(Reads read){
|
||||||
return KickReason.values()[read.b()];
|
return KickReason.all[read.b()];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void writeMarkerControl(Writes write, LMarkerControl reason){
|
public static void writeMarkerControl(Writes write, LMarkerControl reason){
|
||||||
@@ -786,7 +786,7 @@ public class TypeIO{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static AdminAction readAction(Reads read){
|
public static AdminAction readAction(Reads read){
|
||||||
return AdminAction.values()[read.b()];
|
return AdminAction.all[read.b()];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void writeUnitType(Writes write, UnitType effect){
|
public static void writeUnitType(Writes write, UnitType effect){
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ public class Packets{
|
|||||||
nameInUse, idInUse, nameEmpty, customClient, serverClose, vote, typeMismatch,
|
nameInUse, idInUse, nameEmpty, customClient, serverClose, vote, typeMismatch,
|
||||||
whitelist, playerLimit, serverRestarting;
|
whitelist, playerLimit, serverRestarting;
|
||||||
|
|
||||||
|
public static final KickReason[] all = values();
|
||||||
|
|
||||||
public final boolean quiet;
|
public final boolean quiet;
|
||||||
|
|
||||||
KickReason(){
|
KickReason(){
|
||||||
@@ -38,7 +40,9 @@ public class Packets{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public enum AdminAction{
|
public enum AdminAction{
|
||||||
kick, ban, trace, wave, switchTeam
|
kick, ban, trace, wave, switchTeam;
|
||||||
|
|
||||||
|
public static final AdminAction[] all = values();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Generic client connection event. */
|
/** Generic client connection event. */
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public class MapPlayDialog extends BaseDialog{
|
|||||||
ScrollPane pane = new ScrollPane(table);
|
ScrollPane pane = new ScrollPane(table);
|
||||||
pane.setFadeScrollBars(false);
|
pane.setFadeScrollBars(false);
|
||||||
table.row();
|
table.row();
|
||||||
for(Gamemode mode : Gamemode.values()){
|
for(Gamemode mode : Gamemode.all){
|
||||||
if(mode.hidden) continue;
|
if(mode.hidden) continue;
|
||||||
table.labelWrap("[accent]" + mode + ":[] [lightgray]" + mode.description()).width(400f);
|
table.labelWrap("[accent]" + mode + ":[] [lightgray]" + mode.description()).width(400f);
|
||||||
table.row();
|
table.row();
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ org.gradle.caching=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=f0d4fdbf89
|
archash=eac3d7211c
|
||||||
|
|||||||
Reference in New Issue
Block a user