Conditional fluid chunk network activity
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-12-01 18:26:51 -05:00
parent 0b9f62cc0e
commit 6b3a07cbc1
3 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,3 @@
#maven.buildNumber.plugin properties file #maven.buildNumber.plugin properties file
#Sun Dec 01 18:23:03 EST 2024 #Sun Dec 01 18:25:39 EST 2024
buildNumber=484 buildNumber=485

View File

@ -1215,6 +1215,7 @@ Server homogenous fluid chunk declarations
Unsleeping fluid chunks on edit Unsleeping fluid chunks on edit
Conditionally rasterize fluid chunks based on homogeneity Conditionally rasterize fluid chunks based on homogeneity
Awake fluid chunks based on neighbor state Awake fluid chunks based on neighbor state
Fluid chunk conditionally send update based on sleep status

View File

@ -46,7 +46,6 @@ void updateMetadata(JNIEnv * env, int numChunks, Chunk ** passedInChunks, Enviro
(*env)->SetBooleanField(env,jObj,environment->lookupTable.serverFluidChunkTable.homogenousId,homogenous); (*env)->SetBooleanField(env,jObj,environment->lookupTable.serverFluidChunkTable.homogenousId,homogenous);
//update total density //update total density
(*env)->SetBooleanField(env,jObj,updatedId,JNI_TRUE);
(*env)->SetFloatField(env,jObj,totalDensityId,sum); (*env)->SetFloatField(env,jObj,totalDensityId,sum);
//check if any neighbor is non-homogenous //check if any neighbor is non-homogenous
@ -75,6 +74,7 @@ void updateMetadata(JNIEnv * env, int numChunks, Chunk ** passedInChunks, Enviro
//if this cell is awake AND non-homogenous, make sure all neighbors are awake //if this cell is awake AND non-homogenous, make sure all neighbors are awake
if(shouldSleep == JNI_FALSE && homogenous == JNI_FALSE){ if(shouldSleep == JNI_FALSE && homogenous == JNI_FALSE){
(*env)->SetBooleanField(env,jObj,updatedId,JNI_TRUE);
for(int j = 0; j < NEIGHBOR_ARRAY_COUNT; j++){ for(int j = 0; j < NEIGHBOR_ARRAY_COUNT; j++){
if(j == CENTER_LOC){ if(j == CENTER_LOC){
continue; continue;