Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Planard committed Jan 29, 2012
1 parent 3536662 commit 04924be
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions js/game.js
Expand Up @@ -265,7 +265,6 @@ function newBoid(id, x, y, u, v, color, url) {
audio.currentTime = 0;
audio.play();

osg.log("LOCKED!");
return;
}
}
Expand Down Expand Up @@ -472,15 +471,15 @@ function newPlayer(id, x, y, u, v) {
killChain(b1);
b1.count = 0;
var snd = mr_lst[Math.floor(Math.random()*mr_lst.length)];
osg.log("PLAY "+snd);
//osg.log("PLAY "+snd);
var audio = $(snd).get(0);
audio.currentTime = 0;
audio.play();
} else {
var c = chains.shift();
if (c) {
score -= c.count;
osg.log(score);
//osg.log(score);
killChain(c);
var i=0;
if (c.count > 4) {
Expand All @@ -490,7 +489,7 @@ function newPlayer(id, x, y, u, v) {
i=2;
}
var snd = explosions[i];
osg.log("PLAY "+snd);
//osg.log("PLAY "+snd);
var audio = $(snd).get(0);
audio.currentTime = 0;
audio.play();
Expand All @@ -517,7 +516,7 @@ function newPlayer(id, x, y, u, v) {
chains.unshift(b2);

score += b2.count;
osg.log(score);
//osg.log(score);

//var count = Math.min(b2.count, 10);

Expand All @@ -538,17 +537,17 @@ function newPlayer(id, x, y, u, v) {
osg.log(whiteElements);

var bb;

function wE(bb) {
if (bb) {
bb.geom.kill(function(){
bb.toDelete = true;
});
}

function wE(b) {
b.geom.kill(function(){
b.toDelete = true;
});
}

while((bb = whiteElements.shift())) {
wE(bb);
if (bb) {
wE(bb);
}
}

} else {
Expand Down

0 comments on commit 04924be

Please sign in to comment.