Update velocity.js

This commit is contained in:
slweeb 2023-10-14 20:28:27 -04:00
parent 9062991e0b
commit 14411abbac
1 changed files with 2 additions and 20 deletions

View File

@ -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;
}
}