|
|
@ -70,12 +70,12 @@ void Meteos::updateGame(float fElapsedTime){ |
|
|
|
if (c2.getBlockPosition(b2).x==c.getBlockPosition(b3).x&& |
|
|
|
if (c2.getBlockPosition(b2).x==c.getBlockPosition(b3).x&& |
|
|
|
c2.getBlockPosition(b2).y+12>=c.getBlockPosition(b3).y&& |
|
|
|
c2.getBlockPosition(b2).y+12>=c.getBlockPosition(b3).y&& |
|
|
|
c2.getBlockPosition(b2).y<=c.getBlockPosition(b3).y+12) { |
|
|
|
c2.getBlockPosition(b2).y<=c.getBlockPosition(b3).y+12) { |
|
|
|
float yDiff=(c2.getBlockPosition(b2).y>c.getBlockPosition(b3).y)? |
|
|
|
|
|
|
|
c2.getBlockPosition(b2).y-c.getBlockPosition(b3).y: |
|
|
|
|
|
|
|
c.getBlockPosition(b3).y-c2.getBlockPosition(b2).y; |
|
|
|
|
|
|
|
c2.y+=(c2.getBlockPosition(b2).y>c.getBlockPosition(b3).y)? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
yDiff:-yDiff; |
|
|
|
if (c2.getBlockPosition(b2).y>c.getBlockPosition(b3).y) { |
|
|
|
|
|
|
|
c.y-=12-(c2.getBlockPosition(b2).y-c.getBlockPosition(b3).y); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
c2.y-=12-(c.getBlockPosition(b3).y-c2.getBlockPosition(b2).y); |
|
|
|
|
|
|
|
} |
|
|
|
float influence=(float)c.getBlocks().size()/(c.getBlocks().size()+c2.getBlocks().size()); |
|
|
|
float influence=(float)c.getBlocks().size()/(c.getBlocks().size()+c2.getBlocks().size()); |
|
|
|
int blockCount=c.getBlocks().size(); |
|
|
|
int blockCount=c.getBlocks().size(); |
|
|
|
//Copy every block from one clump to the other
|
|
|
|
//Copy every block from one clump to the other
|
|
|
|