Bugfixes
|
Before Width: | Height: | Size: 554 KiB After Width: | Height: | Size: 553 KiB |
|
Before Width: | Height: | Size: 664 KiB After Width: | Height: | Size: 662 KiB |
|
Before Width: | Height: | Size: 952 KiB After Width: | Height: | Size: 950 KiB |
|
Before Width: | Height: | Size: 504 KiB After Width: | Height: | Size: 503 KiB |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 2.8 MiB After Width: | Height: | Size: 2.8 MiB |
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 185 KiB |
@@ -440,6 +440,7 @@ public class UnitTypes implements ContentList{
|
|||||||
buildSpeed = 1.7f;
|
buildSpeed = 1.7f;
|
||||||
armor = 9f;
|
armor = 9f;
|
||||||
landShake = 1.5f;
|
landShake = 1.5f;
|
||||||
|
rotateSpeed = 1.5f;
|
||||||
|
|
||||||
commandLimit = 24;
|
commandLimit = 24;
|
||||||
|
|
||||||
@@ -1229,6 +1230,7 @@ public class UnitTypes implements ContentList{
|
|||||||
payloadCapacity = (3 * 3) * (8 * 8);
|
payloadCapacity = (3 * 3) * (8 * 8);
|
||||||
buildSpeed = 2.5f;
|
buildSpeed = 2.5f;
|
||||||
range = 140f;
|
range = 140f;
|
||||||
|
targetAir = false;
|
||||||
|
|
||||||
weapons.add(
|
weapons.add(
|
||||||
new Weapon(){{
|
new Weapon(){{
|
||||||
@@ -1241,7 +1243,8 @@ public class UnitTypes implements ContentList{
|
|||||||
sprite = "large-bomb";
|
sprite = "large-bomb";
|
||||||
width = height = 120/4f;
|
width = height = 120/4f;
|
||||||
|
|
||||||
range = 20f;
|
range = 30f;
|
||||||
|
ignoreRotation = true;
|
||||||
|
|
||||||
backColor = Pal.heal;
|
backColor = Pal.heal;
|
||||||
frontColor = Color.white;
|
frontColor = Color.white;
|
||||||
@@ -1249,7 +1252,6 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
shootCone = 180f;
|
shootCone = 180f;
|
||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
ignoreRotation = true;
|
|
||||||
shootSound = Sounds.none;
|
shootSound = Sounds.none;
|
||||||
despawnShake = 4f;
|
despawnShake = 4f;
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ public abstract class BulletType extends Content{
|
|||||||
public boolean hittable = true;
|
public boolean hittable = true;
|
||||||
/** Whether this bullet can be reflected. */
|
/** Whether this bullet can be reflected. */
|
||||||
public boolean reflectable = true;
|
public boolean reflectable = true;
|
||||||
|
/** Bullet range override. */
|
||||||
|
public float range = -1f;
|
||||||
|
|
||||||
//additional effects
|
//additional effects
|
||||||
|
|
||||||
@@ -126,7 +128,7 @@ public abstract class BulletType extends Content{
|
|||||||
|
|
||||||
/** Returns maximum distance the bullet this bullet type has can travel. */
|
/** Returns maximum distance the bullet this bullet type has can travel. */
|
||||||
public float range(){
|
public float range(){
|
||||||
return speed * lifetime * (1f - drag);
|
return Math.max(speed * lifetime * (1f - drag), range);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean collides(Bullet bullet, Building tile){
|
public boolean collides(Bullet bullet, Building tile){
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
void safeConnect(String ip, int port, int version){
|
void safeConnect(String ip, int port, int version){
|
||||||
if(version != Version.build && Version.build != -1 && version != -1){
|
if(version != Version.build && Version.build != -1 && version != -1){
|
||||||
ui.showInfo("[scarlet]" + (version > Version.build ? KickReason.clientOutdated : KickReason.serverOutdated).toString() + "\n[]" +
|
ui.showInfo("[scarlet]" + (version > Version.build ? KickReason.clientOutdated : KickReason.serverOutdated).toString() + "\n[]" +
|
||||||
Core.bundle.format("server.versions", Version.build, version));
|
Core.bundle.format("server.versions", Version.build, version));
|
||||||
}else{
|
}else{
|
||||||
connect(ip, port);
|
connect(ip, port);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLobbyEnter(SteamID steamIDLobby, int chatPermissions, boolean blocked, ChatRoomEnterResponse response){
|
public void onLobbyEnter(SteamID steamIDLobby, int chatPermissions, boolean blocked, ChatRoomEnterResponse response){
|
||||||
Log.info("enter lobby @ @", steamIDLobby.getAccountID(), response);
|
Log.info("onLobbyEnter @ @", steamIDLobby.getAccountID(), response);
|
||||||
|
|
||||||
if(response != ChatRoomEnterResponse.Success){
|
if(response != ChatRoomEnterResponse.Success){
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
@@ -241,6 +241,17 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int version = Strings.parseInt(smat.getLobbyData(steamIDLobby, "version"), -1);
|
||||||
|
|
||||||
|
//check version
|
||||||
|
if(version != Version.build){
|
||||||
|
ui.loadfrag.hide();
|
||||||
|
ui.showInfo("[scarlet]" + (version > Version.build ? KickReason.clientOutdated : KickReason.serverOutdated).toString() + "\n[]" +
|
||||||
|
Core.bundle.format("server.versions", Version.build, version));
|
||||||
|
smat.leaveLobby(steamIDLobby);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
logic.reset();
|
logic.reset();
|
||||||
net.reset();
|
net.reset();
|
||||||
|
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ public class Generators{
|
|||||||
|
|
||||||
Color outc = Pal.darkerMetal;
|
Color outc = Pal.darkerMetal;
|
||||||
//Func<Image, Image> outlineS = i -> i.shadow(0.8f, 9);
|
//Func<Image, Image> outlineS = i -> i.shadow(0.8f, 9);
|
||||||
Func<Image, Image> outline = i -> i.outline(4, outc);
|
Func<Image, Image> outline = i -> i.outline(3, outc);
|
||||||
Cons<TextureRegion> outliner = t -> {
|
Cons<TextureRegion> outliner = t -> {
|
||||||
if(t != null && t.found()){
|
if(t != null && t.found()){
|
||||||
ImagePacker.replace(t, outline.get(ImagePacker.get(t)));
|
ImagePacker.replace(t, outline.get(ImagePacker.get(t)));
|
||||||
|
|||||||