summaryrefslogtreecommitdiff
path: root/src/simulation/elements/ANAR.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/ANAR.cpp
parentc65081d3ed44a97cea0f41a63e9ec07cf0feb5f2 (diff)
downloadpowder-5873d6958641af21b92fcb039d26c336331f19e7.zip
powder-5873d6958641af21b92fcb039d26c336331f19e7.tar.gz
Going through again.
Diffstat (limited to 'src/simulation/elements/ANAR.cpp')
-rw-r--r--src/simulation/elements/ANAR.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/simulation/elements/ANAR.cpp b/src/simulation/elements/ANAR.cpp
index 6dd500f..aa88afb 100644
--- a/src/simulation/elements/ANAR.cpp
+++ b/src/simulation/elements/ANAR.cpp
@@ -60,15 +60,12 @@ int Element_ANAR::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx];
if (!r)
continue;
- if ((r&0xFF)==PT_HFLM)
+ if ((r&0xFF)==PT_HFLM && !(rand()%22))
{
- if (1>rand()%22)
- {
- sim->part_change_type(i,x,y,PT_HFLM);
- parts[i].life = rand()%150+50;
- parts[r>>8].temp = parts[i].temp = 0;
- sim->pv[y/CELL][x/CELL] -= 0.5;
- }
+ sim->part_change_type(i,x,y,PT_HFLM);
+ parts[i].life = rand()%150+50;
+ parts[r>>8].temp = parts[i].temp = 0;
+ sim->pv[y/CELL][x/CELL] -= 0.5;
}
}
return 0;