Hook user settings into draw/sim radius
This commit is contained in:
parent
0ef9d8c309
commit
e39af4a78c
@ -1,11 +1,14 @@
|
||||
{
|
||||
"gameplayGenerateWorld" : false,
|
||||
"gameplayPhysicsCellRadius" : 2,
|
||||
|
||||
"displayWidth" : 1920,
|
||||
"displayHeight" : 1080,
|
||||
|
||||
"graphicsFOV" : 90.0,
|
||||
|
||||
|
||||
|
||||
"graphicsPerformanceLODChunkRadius" : 5,
|
||||
"graphicsPerformanceEnableVSync" : true,
|
||||
"graphicsPerformanceDrawShadows" : true,
|
||||
|
||||
|
||||
@ -95,6 +95,10 @@ public class DrawCellManager {
|
||||
|
||||
program = Globals.defaultMeshShader;
|
||||
|
||||
drawRadius = Globals.userSettings.getGraphicsPerformanceLODChunkRadius();
|
||||
drawStepdownInterval = Globals.userSettings.getGameplayPhysicsCellRadius();
|
||||
physicsRadius = Globals.userSettings.getGameplayPhysicsCellRadius();
|
||||
|
||||
update = true;
|
||||
}
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ public class UserSettings {
|
||||
//Gameplay settings
|
||||
//
|
||||
boolean gameplayGenerateWorld;
|
||||
int gameplayPhysicsCellRadius;
|
||||
|
||||
|
||||
//
|
||||
@ -29,6 +30,7 @@ public class UserSettings {
|
||||
//general
|
||||
float graphicsFOV;
|
||||
//performance
|
||||
int graphicsPerformanceLODChunkRadius;
|
||||
boolean graphicsPerformanceEnableVSync;
|
||||
boolean graphicsPerformanceDrawShadows;
|
||||
//debug
|
||||
@ -78,6 +80,14 @@ public class UserSettings {
|
||||
public boolean graphicsDebugDrawMovementVectors() {
|
||||
return graphicsDebugDrawMovementVectors;
|
||||
}
|
||||
|
||||
public int getGameplayPhysicsCellRadius() {
|
||||
return gameplayPhysicsCellRadius;
|
||||
}
|
||||
|
||||
public int getGraphicsPerformanceLODChunkRadius() {
|
||||
return graphicsPerformanceLODChunkRadius;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -100,11 +110,13 @@ public class UserSettings {
|
||||
|
||||
//gameplay settings
|
||||
rVal.gameplayGenerateWorld = true;
|
||||
rVal.gameplayPhysicsCellRadius = 2;
|
||||
|
||||
//graphics settings
|
||||
rVal.graphicsDebugDrawCollisionSpheres = false;
|
||||
rVal.graphicsDebugDrawMovementVectors = false;
|
||||
rVal.graphicsDebugDrawPhysicsObjects = false;
|
||||
rVal.graphicsPerformanceLODChunkRadius = 5;
|
||||
rVal.graphicsFOV = 90.0f;
|
||||
rVal.graphicsPerformanceDrawShadows = true;
|
||||
rVal.graphicsPerformanceEnableVSync = true;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package electrosphere.net.server;
|
||||
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.main.Globals;
|
||||
import electrosphere.net.parser.net.message.NetworkMessage;
|
||||
import java.util.concurrent.Semaphore;
|
||||
|
||||
@ -25,6 +26,7 @@ public class Player {
|
||||
id = idIncrementer;
|
||||
idIncrementer++;
|
||||
idIncrementerLock.release();
|
||||
this.simulationRadius = Globals.userSettings.getGameplayPhysicsCellRadius();
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user