diff --git a/bin/RabiClone.jar b/bin/RabiClone.jar index 2aa76d3..fa43b78 100644 Binary files a/bin/RabiClone.jar and b/bin/RabiClone.jar differ diff --git a/src/sig/RabiClone.java b/src/sig/RabiClone.java index 1b4281f..49c8637 100644 --- a/src/sig/RabiClone.java +++ b/src/sig/RabiClone.java @@ -90,7 +90,7 @@ public class RabiClone{ while (true) { long timePassed = System.nanoTime()-lastGameTime; lastGameTime=System.nanoTime(); - double updateMult = Math.min(1/120d,timePassed/1000000000d); + double updateMult = 1/60d; handleGameControllers(); diff --git a/src/sig/engine/String.java b/src/sig/engine/String.java index f3f7244..1ba8b19 100644 --- a/src/sig/engine/String.java +++ b/src/sig/engine/String.java @@ -21,8 +21,13 @@ public class String{ this.sb=new StringBuilder(Double.toString(d)); updateBounds(Double.toString(d)); } + public String append(double d) { + this.sb.append(d); + updateBounds(Double.toString(d)); + return this; + } public String append(char c) { - this.sb=new StringBuilder(c); + this.sb.append(c); updateBounds(Character.toString(c)); return this; } diff --git a/src/sig/objects/EditorRenderer.java b/src/sig/objects/EditorRenderer.java index 8aabf8d..634028a 100644 --- a/src/sig/objects/EditorRenderer.java +++ b/src/sig/objects/EditorRenderer.java @@ -80,12 +80,8 @@ public class EditorRenderer extends LevelRenderer{ if (messageLog.length()>0) { if (System.currentTimeMillis()-last_message_log>MESSAGE_TIME) { last_message_log=System.currentTimeMillis(); - if (messageLog.length()>1) { - int secondMarker = messageLog.indexOf("\n",messageLog.indexOf("\n")+1); - messageLog.replace(messageLog.indexOf("\n"), secondMarker==-1?messageLog.length():secondMarker, ""); - } else { - messageLog.clear(); - } + int secondMarker = messageLog.indexOf("\n",messageLog.indexOf("\n")+1); + messageLog.replace(messageLog.indexOf("\n"), secondMarker==-1?messageLog.length():secondMarker, ""); } } }