server LOD emitter fix
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2025-05-28 16:29:33 -04:00
parent 9309263036
commit 3e89dd9224
4 changed files with 8 additions and 6 deletions

View File

@ -2026,8 +2026,9 @@ Fix macro structure rotation generation
Improvement to building placement math in TownLayout
Scaffold character job data
Moving data packages around
Fix client LOD tree re-enabling physics positioning
Fix client LOD component re-enabling physics positioning
Debug rendering of server physics objects
Server LOD component properly attaches physics bodies when the entity comes in range

View File

@ -58,7 +58,7 @@ public class ServerLODComponent implements BehaviorTree {
Vector3d parentLoc = EntityUtils.getPosition(this.parent);
boolean fullRes = Globals.serverState.lodEmitterService.isFullLod(parentLoc);
if(fullRes){
if(lodLevel != FULL_RES){
if(this.lodLevel != FULL_RES){
//make full res
this.setLodLevel(FULL_RES);
Realm realm = Globals.serverState.realmManager.getEntityRealm(this.parent);
@ -68,7 +68,7 @@ public class ServerLODComponent implements BehaviorTree {
}
}
} else {
if(lodLevel != LOW_RES){
if(this.lodLevel != LOW_RES){
//make low res
this.setLodLevel(LOW_RES);
Realm realm = Globals.serverState.realmManager.getEntityRealm(this.parent);

View File

@ -116,7 +116,8 @@ public class DebugContentPipeline implements RenderPipeline {
//render server physics objects
if(Globals.gameConfigCurrent.getSettings().graphicsDebugDrawPhysicsObjectsServer()){
CollisionEngine engine = Globals.serverState.realmManager.first().getCollisionEngine();
for(Collidable collidable : engine.getCollidables()){
LinkedList<Collidable> collidables = new LinkedList<Collidable>(engine.getCollidables());
for(Collidable collidable : collidables){
Entity physicsEntity = collidable.getParent();
if(physicsEntity.getData(EntityDataStrings.PHYSICS_MODEL_TEMPLATE) != null){
CollidableTemplate template = (CollidableTemplate)physicsEntity.getData(EntityDataStrings.PHYSICS_MODEL_TEMPLATE);

View File

@ -98,13 +98,13 @@ public class LODEmitterService extends SignalServiceImpl {
for(Entity emitter : this.getEmitters()){
Vector3d emitterLoc = EntityUtils.getPosition(emitter);
double dist = position.distance(emitterLoc);
if(dist < ServerLODComponent.FULL_RES){
if(dist < ServerLODComponent.LOD_RADIUS){
return true;
}
}
for(Vector3d tempVec : this.tempVecs){
double dist = position.distance(tempVec);
if(dist < ServerLODComponent.FULL_RES){
if(dist < ServerLODComponent.LOD_RADIUS){
return true;
}
}