Skip to content

Commit

Permalink
Update velocity.js
Browse files Browse the repository at this point in the history
  • Loading branch information
slweeb committed Oct 15, 2023
1 parent 9062991 commit 14411ab
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions mods/velocity.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,26 +198,8 @@ explodeAt = function(x,y,radius,fire="fire") {
continue;
}
else if (damage > 0.25) {
if (info.breakInto) {
// if it is an array, choose a random item, else just use the value
if (Array.isArray(info.breakInto)) {
var result = info.breakInto[Math.floor(Math.random() * info.breakInto.length)];
}
else {
var result = info.breakInto;
}
// change the pixel to the result
changePixel(pixel,result);
continue;
}
else {
if (Array.isArray(fire)) {
var newfire = fire[Math.floor(Math.random() * fire.length)];
}
else {
var newfire = fire;
}
changePixel(pixel,newfire);
if (info.breakInto !== undefined) {
breakPixel(pixel);
continue;
}
}
Expand Down

0 comments on commit 14411ab

Please sign in to comment.