Browse Source

Rename AlwaysSync into AlwaysSyncAnimation

clandrin 3 years ago
parent
commit
7ae1bbc73f
3 changed files with 4 additions and 4 deletions
  1. 1 1
      hrt/prefab/fx/FX.hx
  2. 2 2
      hrt/prefab/l3d/MeshSpray.hx
  3. 1 1
      hrt/prefab/l3d/Spray.hx

+ 1 - 1
hrt/prefab/fx/FX.hx

@@ -110,7 +110,7 @@ class FXAnimation extends h3d.scene.Object {
 		if( !visible || (culled && inheritCulled) )
 		if( !visible || (culled && inheritCulled) )
 			ctx.visibleFlag = false;
 			ctx.visibleFlag = false;
 
 
-		var fullSync = ctx.visibleFlag || alwaysSync || firstSync;
+		var fullSync = ctx.visibleFlag || alwaysSyncAnimation || firstSync;
 		var finishedPlaying = false;
 		var finishedPlaying = false;
 		if(playSpeed > 0 || firstSync) {
 		if(playSpeed > 0 || firstSync) {
 			// This is done in syncRec() to make sure time and events are updated regarless of culling state,
 			// This is done in syncRec() to make sure time and events are updated regarless of culling state,

+ 2 - 2
hrt/prefab/l3d/MeshSpray.hx

@@ -214,7 +214,7 @@ class MeshSprayObject extends Spray.SprayObject {
 			batch = new h3d.scene.MeshBatch(cast(m.primitive,h3d.prim.MeshPrimitive), m.material, this);
 			batch = new h3d.scene.MeshBatch(cast(m.primitive,h3d.prim.MeshPrimitive), m.material, this);
 			var multi = Std.downcast(m, h3d.scene.MultiMaterial);
 			var multi = Std.downcast(m, h3d.scene.MultiMaterial);
 			if( multi != null ) batch.materials = multi.materials;
 			if( multi != null ) batch.materials = multi.materials;
-			batch.alwaysSync = true;
+			batch.alwaysSyncAnimation = true;
 			batch.begin();
 			batch.begin();
 			batches.push(batch);
 			batches.push(batch);
 			blookup.set(m.primitive, batch);
 			blookup.set(m.primitive, batch);
@@ -243,7 +243,7 @@ class MeshSprayObject extends Spray.SprayObject {
 		}
 		}
 		for( c in children ) {
 		for( c in children ) {
 			c.culled = false;
 			c.culled = false;
-			if( c.alwaysSync ) continue;
+			if( c.alwaysSyncAnimation ) continue;
 			var m = Std.downcast(c, h3d.scene.Mesh);
 			var m = Std.downcast(c, h3d.scene.Mesh);
 			if( m == null || !Std.isOfType(m.primitive, h3d.prim.MeshPrimitive) ) continue;
 			if( m == null || !Std.isOfType(m.primitive, h3d.prim.MeshPrimitive) ) continue;
 
 

+ 1 - 1
hrt/prefab/l3d/Spray.hx

@@ -82,7 +82,7 @@ class SprayObject extends h3d.scene.Object {
 		getBounds(); // force absBos calculus on children
 		getBounds(); // force absBos calculus on children
 		for( c in children ) {
 		for( c in children ) {
 			c.culled = false;
 			c.culled = false;
-			if( c.alwaysSync ) continue;
+			if( c.alwaysSyncAnimation ) continue;
 		}
 		}
 	}
 	}