Explorar o código

FollowerObject: don't syncPos when getSize

Tom Spira %!s(int64=4) %!d(string=hai) anos
pai
achega
253676e54a
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  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();
 	}