소스 검색

fixed particle count

ncannasse 11 년 전
부모
커밋
68f962936f
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      h3d/parts/Emitter.hx

+ 2 - 3
h3d/parts/Emitter.hx

@@ -96,10 +96,8 @@ class Emitter extends h3d.scene.Object {
 			if( b.time <= time && b.time > old )
 				emitCount += b.count;
 		while( emitCount > 0 ) {
-			if( count < s.maxParts ) {
+			if( count < s.maxParts )
 				emitParticle();
-				count++;
-			}
 			emitCount -= 1;
 			if( state.emitTrail )
 				break;
@@ -203,6 +201,7 @@ class Emitter extends h3d.scene.Object {
 			pool = p.next;
 		}
 		initPart(p);
+		count++;
 		switch( state.sortMode ) {
 		case Front, Sort, InvSort:
 			if( head == null ) {