summaryrefslogtreecommitdiff
path: root/src/simulation/elements/BCOL.cpp
diff options
context:
space:
mode:
authorcracker64 <cracker642@gmail.com>2013-02-28 17:37:16 (GMT)
committer cracker64 <cracker642@gmail.com>2013-02-28 17:37:16 (GMT)
commit5873d6958641af21b92fcb039d26c336331f19e7 (patch)
treea334e74d7cf79726f5c0a411515bed801ee0333f /src/simulation/elements/BCOL.cpp
parentc65081d3ed44a97cea0f41a63e9ec07cf0feb5f2 (diff)
downloadpowder-5873d6958641af21b92fcb039d26c336331f19e7.zip
powder-5873d6958641af21b92fcb039d26c336331f19e7.tar.gz
Going through again.
Diffstat (limited to 'src/simulation/elements/BCOL.cpp')
-rw-r--r--src/simulation/elements/BCOL.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/simulation/elements/BCOL.cpp b/src/simulation/elements/BCOL.cpp
index 1fb6f82..ff92f8f 100644
--- a/src/simulation/elements/BCOL.cpp
+++ b/src/simulation/elements/BCOL.cpp
@@ -65,15 +65,15 @@ int Element_BCOL::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx];
if (!r)
continue;
- if (((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM) && 1>(rand()%500))
+ if (((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM))
{
- if (parts[i].life>100) {
+ if (parts[i].life>100 && !(rand()%500)) {
parts[i].life = 99;
}
}
- if ((r&0xFF)==PT_LAVA && 1>(rand()%500))
+ else if ((r&0xFF)==PT_LAVA)
{
- if (parts[r>>8].ctype == PT_IRON) {
+ if (parts[r>>8].ctype == PT_IRON && !(rand()%500)) {
parts[r>>8].ctype = PT_METL;
sim->kill_part(i);
return 1;
@@ -143,4 +143,4 @@ int Element_BCOL::graphics(GRAPHICS_FUNC_ARGS)
-Element_BCOL::~Element_BCOL() {} \ No newline at end of file
+Element_BCOL::~Element_BCOL() {}