draw cell manager test fix
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2025-05-30 22:20:57 -04:00
parent 4a17a757ed
commit 2b7651b49e
2 changed files with 5 additions and 2 deletions

View File

@ -2088,6 +2088,7 @@ Macro pathfinding scaffolding
Macro pathfinding work
Actual macro pathfinding implementation
Enable AI for low-lod entities
Fix draw cell manager test

View File

@ -6,13 +6,14 @@ import org.joml.Vector3f;
import org.joml.Vector3i;
import org.junit.jupiter.api.extension.ExtendWith;
import electrosphere.client.ClientState;
import electrosphere.client.scene.ClientWorldData;
import electrosphere.engine.Globals;
import electrosphere.engine.Main;
import electrosphere.server.physics.terrain.manager.ServerTerrainChunk;
import electrosphere.test.annotations.UnitTest;
import electrosphere.test.template.extensions.StateCleanupCheckerExtension;
import electrosphere.test.testutils.EngineInit;
import electrosphere.test.testutils.TestEngineUtils;
import electrosphere.util.ds.octree.WorldOctTree.WorldOctTreeNode;
/**
@ -37,7 +38,8 @@ public class ClientDrawCellManagerTests {
public void testJoinCase(){
int worldDiscreteSize = 64;
Globals.clientState = new ClientState();
EngineInit.initGraphicalEngine();
TestEngineUtils.flush();
Globals.clientState.clientWorldData = new ClientWorldData(new Vector3f(0), new Vector3f(worldDiscreteSize * ServerTerrainChunk.CHUNK_DIMENSION), worldDiscreteSize);
ClientDrawCellManager manager = new ClientDrawCellManager(null, 64);
Vector3i playerPos = new Vector3i(0,0,0);