Sfoglia il codice sorgente

FollowerObject: don't syncPos when getSize

Tom Spira 4 anni fa
parent
commit
253676e54a
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. 9 0
      h2d/ObjectFollower.hx

+ 9 - 0
h2d/ObjectFollower.hx

@@ -121,6 +121,15 @@ class ObjectFollower extends Object {
 	}
 
 	override function syncPos() {
+		if( follow == null ) {
+			if( posChanged ) {
+				calcAbsPos();
+				for( c in children )
+					c.posChanged = true;
+				posChanged = false;
+			}
+			return;
+		}
 		followObject();
 		super.syncPos();
 	}