aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/lodmod/renderer/LODRenderer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/makamys/lodmod/renderer/LODRenderer.java')
-rw-r--r--src/main/java/makamys/lodmod/renderer/LODRenderer.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
index 4b2e016..7578633 100644
--- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java
+++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
@@ -81,7 +81,9 @@ public class LODRenderer {
private double lastSortZ = Double.NaN;
private long lastGCTime = -1;
- private long gcInterval = 60 * 1000;
+ private long lastSaveTime = -1;
+ private long gcInterval = 10 * 1000;
+ private long saveInterval = 60 * 1000;
public int renderRange = 48;
@@ -105,12 +107,14 @@ public class LODRenderer {
mainLoop();
handleKeyboard();
- gcInterval = 10 * 1000;
if(lastGCTime == -1 || (System.currentTimeMillis() - lastGCTime) > gcInterval) {
runGC();
- onSave();
lastGCTime = System.currentTimeMillis();
}
+ if(lastSaveTime == -1 || (System.currentTimeMillis() - lastSaveTime) > saveInterval) {
+ onSave();
+ lastSaveTime = System.currentTimeMillis();
+ }
if(renderLOD) {
sort();