@@ -171,19 +171,17 @@ Phaser.QuadTree.prototype = {
171171 */
172172 split : function ( ) {
173173
174- this . level ++ ;
175-
176174 // top right node
177- this . nodes [ 0 ] = new Phaser . QuadTree ( this . bounds . right , this . bounds . y , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , this . level ) ;
175+ this . nodes [ 0 ] = new Phaser . QuadTree ( this . bounds . right , this . bounds . y , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , ( this . level + 1 ) ) ;
178176
179177 // top left node
180- this . nodes [ 1 ] = new Phaser . QuadTree ( this . bounds . x , this . bounds . y , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , this . level ) ;
178+ this . nodes [ 1 ] = new Phaser . QuadTree ( this . bounds . x , this . bounds . y , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , ( this . level + 1 ) ) ;
181179
182180 // bottom left node
183- this . nodes [ 2 ] = new Phaser . QuadTree ( this . bounds . x , this . bounds . bottom , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , this . level ) ;
181+ this . nodes [ 2 ] = new Phaser . QuadTree ( this . bounds . x , this . bounds . bottom , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , ( this . level + 1 ) ) ;
184182
185183 // bottom right node
186- this . nodes [ 3 ] = new Phaser . QuadTree ( this . bounds . right , this . bounds . bottom , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , this . level ) ;
184+ this . nodes [ 3 ] = new Phaser . QuadTree ( this . bounds . right , this . bounds . bottom , this . bounds . subWidth , this . bounds . subHeight , this . maxObjects , this . maxLevels , ( this . level + 1 ) ) ;
187185
188186 } ,
189187
0 commit comments