fix draw target accumulator bugs
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2025-05-21 16:13:09 -04:00
parent 8517ddbc15
commit cac1893d6e
2 changed files with 15 additions and 11 deletions

View File

@ -93,9 +93,11 @@ public class DrawTargetAccumulator {
* @param transform The transform of the call
*/
public void addCall(Vector3d position, Matrix4d transform){
if(transforms.size() < count){
transforms.get(count).set(transform);
positions.get(count).set(position);
if(transforms.size() > count){
Matrix4d transformObj = transforms.get(this.count);
Vector3d positionObj = positions.get(this.count);
transformObj.set(transform);
positionObj.set(position);
} else {
transforms.add(new Matrix4d(transform));
positions.add(new Vector3d(position));

View File

@ -24,6 +24,7 @@ public class MacroDataUpdater {
*/
public static void update(Realm realm, MacroData macroData, Vector3d playerPos){
//scan for all towns within update range
if(macroData != null){
for(Town town : macroData.getTowns()){
//only generate data for towns that aren't already full resolution
if(town.getResolution() == Town.TOWN_RES_MAX){
@ -35,5 +36,6 @@ public class MacroDataUpdater {
}
}
}
}
}