Fixed #9888
This commit is contained in:
@@ -66,7 +66,7 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
||||
|
||||
Time.setDeltaProvider(() -> {
|
||||
float result = Core.graphics.getDeltaTime() * 60f;
|
||||
return (Float.isNaN(result) || Float.isInfinite(result)) ? 1f : Mathf.clamp(result, 0.0001f, 60f / 10f);
|
||||
return (Float.isNaN(result) || Float.isInfinite(result)) ? 1f : Mathf.clamp(result, 0.0001f, maxDeltaClient);
|
||||
});
|
||||
|
||||
UI.loadColors();
|
||||
|
||||
@@ -154,6 +154,8 @@ public class Vars implements Loadable{
|
||||
public static final int maxModSubtitleLength = 40;
|
||||
/** multicast group for discovery.*/
|
||||
public static final String multicastGroup = "227.2.7.7";
|
||||
/** Maximum delta time. If the actual delta time (*60) between frames is higher than this number, the game will start to slow down. */
|
||||
public static float maxDeltaClient = 6f, maxDeltaServer = 10f;
|
||||
/** whether the graphical game client has loaded */
|
||||
public static boolean clientLoaded = false;
|
||||
/** max GL texture size */
|
||||
|
||||
@@ -130,13 +130,13 @@ public class BlockIndexer{
|
||||
data.turretTree.remove(build);
|
||||
}
|
||||
|
||||
//is no longer registered
|
||||
build.wasDamaged = false;
|
||||
|
||||
//unregister damaged buildings
|
||||
if(build.damaged() && damagedTiles[team.id] != null){
|
||||
if(build.wasDamaged && damagedTiles[team.id] != null){
|
||||
damagedTiles[team.id].remove(build);
|
||||
}
|
||||
|
||||
//is no longer registered
|
||||
build.wasDamaged = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1981,9 +1981,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
switch(prop){
|
||||
case health -> {
|
||||
health = (float)Mathf.clamp(value, 0, maxHealth);
|
||||
healthChanged();
|
||||
if(health <= 0f && !dead()){
|
||||
Call.buildDestroyed(self());
|
||||
}else{
|
||||
healthChanged();
|
||||
}
|
||||
}
|
||||
case team -> {
|
||||
|
||||
Reference in New Issue
Block a user