cleanup todos
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2025-05-05 22:46:56 -04:00
parent 77a564b0e5
commit 99402e5656
21 changed files with 13 additions and 49 deletions

View File

@ -1688,6 +1688,7 @@ Dynamic menu navigation between windows
Starting formatting npc intro page
Code cleanup
More code cleanup
Cleanup some TODOs

View File

@ -46,7 +46,6 @@ public class ClientLocalHitboxCollision {
}
if(isDamageEvent){
//TODO: client logic for audio etc
if(AttachUtils.hasParent(impactorParent)){
Entity parent = AttachUtils.getParent(impactorParent);
if(ClientAttackTree.getClientAttackTree(parent) != null){

View File

@ -225,11 +225,7 @@ public class CameraEntityUtils {
Vector3d cameraUp = SpatialMathUtils.getUpVector();
//!!before you make the same mistake I made, cameraEye is NOT NECESSARILY normalized/unit vector
//the orbital distance and offset are included in this vector
//TODO: refactor this to some other matrix of transforms or something??
cameraEye = new Vector3d(getCameraEye(camera));
// System.out.println("eye: " + cameraEye);
// System.out.println("center: " + cameraCenter);
// System.out.println("up: " + cameraUp);
Matrix4d rVal = new Matrix4d().setLookAt(
cameraEye, //eye
cameraCenter, //center

View File

@ -62,7 +62,7 @@ public class ItemActions {
//client sends custom packets for block editing
boolean sendServerMessage = true;
//TODO: do any immediate client side calculations here (ie start playing an animation until we get response from server)
//do any immediate client side calculations here (ie start playing an animation until we get response from server)
if(Globals.playerEntity != null){
ClientAttackTree attackTree = CreatureUtils.clientGetAttackTree(Globals.playerEntity);
if(attackTree != null){
@ -123,7 +123,7 @@ public class ItemActions {
cursorPos.y,
cursorPos.z
));
//TODO: do any immediate client side calculations here (ie start playing an animation until we get response from server)
//do any immediate client side calculations here (ie start playing an animation until we get response from server)
}
/**
@ -145,7 +145,7 @@ public class ItemActions {
cursorPos.y,
cursorPos.z
));
//TODO: do any immediate client side calculations here (ie start playing an animation until we get response from server)
//do any immediate client side calculations here (ie start playing an animation until we get response from server)
if(Globals.playerEntity != null){
// Vector3f cameraEyeVector = CameraEntityUtils.getCameraEye(Globals.playerCamera);
ClientAttackTree attackTree = CreatureUtils.clientGetAttackTree(Globals.playerEntity);
@ -221,7 +221,7 @@ public class ItemActions {
//client sends custom packets for block editing
boolean sendServerMessage = true;
//TODO: do any immediate client side calculations here (ie start playing an animation until we get response from server)
//do any immediate client side calculations here (ie start playing an animation until we get response from server)
if(Globals.playerEntity != null){
ClientToolbarState clientToolbarState = ClientToolbarState.getClientToolbarState(Globals.playerEntity);
Entity primaryEntity = clientToolbarState.getCurrentPrimaryItem();
@ -273,7 +273,7 @@ public class ItemActions {
cursorPos.y,
cursorPos.z
));
//TODO: do any immediate client side calculations here (ie start playing an animation until we get response from server)
//do any immediate client side calculations here (ie start playing an animation until we get response from server)
}
}

View File

@ -392,7 +392,6 @@ public class ServerAttackTree implements BehaviorTree {
}
if(firesProjectile && projectileToFire != null){
//spawn projectile
//TODO: solve spawnPosition, initialVector
Vector3d spawnPosition = new Vector3d(0,0,0);
Quaterniond arrowRotation = new Quaterniond();
String targetBone = null;

View File

@ -429,6 +429,7 @@ public class ServerEquipState implements BehaviorTree {
//TODO: refactor to allow sending more than one variant at a time
//ie if you have two items equipped and you want to block with both
//think equipping a sword and a shield at once
if(blockVariant != null){
blockTree.setCurrentBlockVariant(blockVariant.getVariantId());
} else {

View File

@ -61,7 +61,6 @@ public class ServerGravityTree implements BehaviorTree {
}
public void start(){
//TODO: check if can start moving
setState(GravityTreeState.ACTIVE);
if(state == GravityTreeState.NOT_ACTIVE){
frameCurrent = 0;

View File

@ -184,7 +184,6 @@ public class ClientInventoryState implements BehaviorTree {
}
} else {
bouncedMessages.add(message);
// throw new UnsupportedOperationException("TODO: in world item is null");
}
} break;
case SERVERUPDATEITEMCHARGES: {

View File

@ -204,7 +204,6 @@ public class ServerEditorMovementTree implements BehaviorTree {
}
Quaterniond movementQuaternion = new Quaterniond().rotationTo(SpatialMathUtils.getOriginVector(), new Vector3d(facingVector.x,0,facingVector.z)).normalize();
Quaterniond rotation = EntityUtils.getRotation(parent);
//TODO: optimize away and document (I know for the moment if this exception isn't here it will bite me in the ass later)
if(facingVector.length() == 0){
throw new IllegalStateException("Facing vector length is 0. This will break ODE4J");
}

View File

@ -219,7 +219,6 @@ public class ServerGroundMovementTree implements BehaviorTree {
}
Quaterniond movementQuaternion = new Quaterniond().rotationTo(SpatialMathUtils.getOriginVector(), new Vector3d(facingVector.x,0,facingVector.z)).normalize();
Quaterniond rotation = EntityUtils.getRotation(parent);
//TODO: optimize away and document (I know for the moment if this exception isn't here it will bite me in the ass later)
if(facingVector.length() == 0){
throw new IllegalStateException("Facing vector length is 0. This will break ODE4J");
}

View File

@ -241,14 +241,6 @@ public class CreatureUtils {
if(storedTemplate.getAttributeValue(attributeType.getAttributeId())==null){
storedTemplate.putAttributeValue(attributeType.getAttributeId(), attributeType.getVariants().get(0).getId());
}
//TODO: determine if this should be relevant to pose actor
//pretty certain it shouldn't be but you never know
// rVal.putData(EntityDataStrings.CREATURE_ATTRIBUTE_VARIANT + attributeType.getAttributeId(), variant.getId());
// Globals.assetManager.addModelPathToQueue(variant.getModel());
// for(String mesh : variant.getMeshes()){
// creatureActor.getMeshMask().queueMesh(variant.getModel(), mesh);
// }
}
}
if(attributeType.getType().equals("bone")){

View File

@ -162,11 +162,7 @@ public class EntityProtocol implements ClientProtocolTemplate<EntityMessage> {
} break;
//
//
// TODO
//
//
case INTERACT:
case UPDATEENTITYVIEWDIR:
case KILL:

View File

@ -1,7 +1,7 @@
package electrosphere.net.parser.net.raw;
import electrosphere.net.parser.net.message.MessagePool;
import electrosphere.net.parser.net.message.NetworkMessage;
package electrosphere.net.parser.net.raw;
import electrosphere.net.parser.net.message.MessagePool;
import electrosphere.net.parser.net.message.NetworkMessage;
import io.github.studiorailgun.CircularByteBuffer;
import java.io.IOException;
import java.io.InputStream;

View File

@ -121,15 +121,6 @@ public class RenderingEngine {
*/
public static Matrix4d modelTransformMatrix = new Matrix4d();
/*
Vertical volumetrics
TODO: implement
*/
// static Texture volumeVerticalBackfaceTexture;
// static Framebuffer volumeVerticalBackfaceBuffer;
// static Texture volumeVerticalFrontfaceTexture;
// static Framebuffer volumeVerticalFrontfaceBuffer;
/*
Post processing effects (ie kernels) textures, framebuffers, shaders
*/

View File

@ -807,7 +807,6 @@ public class FluidChunkModelGeneration {
return rVal;
}
//TODO: more optimal key creation
private static String getVertKeyFromPoints(float x, float y, float z){
return x + "_" + y + "_" + z;
}

View File

@ -902,7 +902,6 @@ public class TerrainChunkModelGeneration {
return rVal;
}
//TODO: more optimal key creation
private static String getVertKeyFromPoints(float x, float y, float z){
return x + "_" + y + "_" + z;
}

View File

@ -145,7 +145,6 @@ public class ServerWorldData {
serverBlockManager = new ServerBlockManager(serverWorldData);
serverBlockManager.load(sceneOrSaveName);
} else {
//TODO: Allow loading procedurally generated terrain from disk (the chunk generator is always default currently)
serverWorldData = FileUtils.loadObjectFromSavePath(sceneOrSaveName, "world.json", ServerWorldData.class);
serverTerrainManager = new ServerTerrainManager(serverWorldData, 0, new ProceduralChunkGenerator(serverWorldData, false));
serverTerrainManager.load(sceneOrSaveName);
@ -169,7 +168,6 @@ public class ServerWorldData {
ServerTerrainManager serverTerrainManager = null;
ServerFluidManager serverFluidManager = null;
ServerBlockManager serverBlockManager = null;
//TODO: Allow loading procedurally generated terrain from disk (the chunk generator is always default currently)
serverWorldData = ServerWorldData.createFixedWorldData(new Vector3d(0),new Vector3d(ProceduralChunkGenerator.GENERATOR_REALM_SIZE * ServerTerrainChunk.CHUNK_DIMENSION));
serverWorldData.worldSizeDiscrete = ProceduralChunkGenerator.GENERATOR_REALM_SIZE;
serverWorldData.worldSizeDiscreteVertical = ProceduralChunkGenerator.GENERATOR_REALM_SIZE;

View File

@ -428,7 +428,6 @@ public class DataCellPhysicsManager {
// // } else {
// // //hacky fix to +2 to this, I think the interpolation ratio was different for server/client data
// // //now that we're merging/ambiguous within this class, it's out of bounds-ing unless I +2
// // //TODO: investigate
// // float[][] rVal = new float[commonWorldData.getDynamicInterpolationRatio() + 2][commonWorldData.getDynamicInterpolationRatio() + 2];
// // rVal[1][1] = 1;
// // rVal[2][1] = 1;

View File

@ -126,7 +126,7 @@ public class MacroData {
// while(!foundPlacementLocation){
// // Vector2i start = new Vector2i(random.nextInt(Globals.serverTerrainManager.getWorldDiscreteSize()),random.nextInt(Globals.serverTerrainManager.getWorldDiscreteSize()));
// // //are we above sea level?
// // if(Globals.serverTerrainManager.getDiscreteValue(start.x, start.y) > 25){ //TODO: Set to actual sea level value
// // if(Globals.serverTerrainManager.getDiscreteValue(start.x, start.y) > 25){
// // //is this position already occupied?
// // boolean match = false;
// // for(Vector2i known : occupiedStartingPositions){

View File

@ -104,7 +104,6 @@ class TectonicSimulation {
}
}
//TODO:
//next subphase is to find large areas without continents and place ones there
//the terrain added in this next phase will be made with a more quick and dirty implementation

View File

@ -18,7 +18,6 @@ public class ServerScriptUtils {
public static void fireSignalOnEntity(Entity entity, String signal, Object ... args){
Realm entityRealm = Globals.realmManager.getEntityRealm(entity);
//TODO: see if we can optimize this if it becomes a problem
Object finalArgs[] = new Object[args.length + 1];
finalArgs[0] = entity.getId();
for(int i = 0; i < args.length; i++){