diff options
| author | Jacob1 <jfu614@gmail.com> | 2012-04-05 23:31:52 (GMT) |
|---|---|---|
| committer | Jacob1 <jfu614@gmail.com> | 2012-05-24 15:02:42 (GMT) |
| commit | e4686724ac4203568b82002bc849df55c9205f8c (patch) | |
| tree | a0389f68e871fd18d0cce97b7fc0b3baf0715785 /src/elements/nble.c | |
| parent | e79d18c58cb6a1cd5c744643fa10cadaea93a71d (diff) | |
| download | powder-e4686724ac4203568b82002bc849df55c9205f8c.zip powder-e4686724ac4203568b82002bc849df55c9205f8c.tar.gz | |
limit amount of ELEC produced to prevent infinite reactions
Diffstat (limited to 'src/elements/nble.c')
| -rw-r--r-- | src/elements/nble.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/elements/nble.c b/src/elements/nble.c index dea5787..0c118ed 100644 --- a/src/elements/nble.c +++ b/src/elements/nble.c @@ -26,7 +26,7 @@ int update_NBLE(UPDATE_FUNC_ARGS) part_change_type(i,x,y,PT_PLSM); parts[i].life = rand()%150+50; j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) parts[j].temp = temp; - j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) parts[j].temp = temp; + if (!(rand()%25)) { j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) parts[j].temp = temp; } j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); if (j != -1) { parts[j].ctype = 0xFF0000; parts[j].temp = temp; } |
