summaryrefslogtreecommitdiff
path: root/src/simulation/elements/COAL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/COAL.cpp')
-rw-r--r--src/simulation/elements/COAL.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/simulation/elements/COAL.cpp b/src/simulation/elements/COAL.cpp
index eae7450..a418971 100644
--- a/src/simulation/elements/COAL.cpp
+++ b/src/simulation/elements/COAL.cpp
@@ -72,15 +72,15 @@ int Element_COAL::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;
@@ -150,4 +150,4 @@ int Element_COAL::graphics(GRAPHICS_FUNC_ARGS)
-Element_COAL::~Element_COAL() {} \ No newline at end of file
+Element_COAL::~Element_COAL() {}