more anti-NaN + noResistance property
This commit is contained in:
parent
a90e0e5618
commit
505e84d860
|
|
@ -26,8 +26,8 @@ function doElectricity(pixel) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (elements[newPixel.element].insulate != true) { // Otherwise heat the pixel (Resistance simulation)
|
else if (elements[newPixel.element].insulate != true && !elements[newPixel.element].noResistance) { // Otherwise heat the pixel (Resistance simulation)
|
||||||
newPixel.temp += pixel.charge/4;
|
newPixel.temp += isNaN(pixel.charge) ? 0.25 : pixel.charge/4;
|
||||||
pixelTempCheck(newPixel);
|
pixelTempCheck(newPixel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue