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