diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-06-26 23:59:07 (GMT) |
|---|---|---|
| committer | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-06-26 23:59:07 (GMT) |
| commit | 167740e83926c233b108ada9ca770f6adaf312dd (patch) | |
| tree | 5182aff33c93c7d1c690b6c5b1cd7a7c62050102 /src/elements | |
| parent | 3a946efdfdf6bfc83540e7b4ce980acd3f6ae9b5 (diff) | |
| download | powder-167740e83926c233b108ada9ca770f6adaf312dd.zip powder-167740e83926c233b108ada9ca770f6adaf312dd.tar.gz | |
Reduce rate of lightning creation by clone
Diffstat (limited to 'src/elements')
| -rw-r--r-- | src/elements/bcln.c | 2 | ||||
| -rw-r--r-- | src/elements/clne.c | 2 | ||||
| -rw-r--r-- | src/elements/pbcn.c | 2 | ||||
| -rw-r--r-- | src/elements/pcln.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/elements/bcln.c b/src/elements/bcln.c index 91dac12..053df18 100644 --- a/src/elements/bcln.c +++ b/src/elements/bcln.c @@ -49,7 +49,7 @@ int update_BCLN(UPDATE_FUNC_ARGS) { } else { if (parts[i].ctype==PT_LIFE) create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); - else + else if (parts[i].ctype!=PT_LIGH || (rand()%30)==0) { int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); if (np>=0) diff --git a/src/elements/clne.c b/src/elements/clne.c index 3ac45d8..e84252a 100644 --- a/src/elements/clne.c +++ b/src/elements/clne.c @@ -41,7 +41,7 @@ int update_CLNE(UPDATE_FUNC_ARGS) { } else { if (parts[i].ctype==PT_LIFE) create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); - else + else if (parts[i].ctype!=PT_LIGH || (rand()%30)==0) { int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); if (np>=0) diff --git a/src/elements/pbcn.c b/src/elements/pbcn.c index 001c5df..edb3f9f 100644 --- a/src/elements/pbcn.c +++ b/src/elements/pbcn.c @@ -101,7 +101,7 @@ int update_PBCN(UPDATE_FUNC_ARGS) { } } } - else + else if (parts[i].ctype!=PT_LIGH || (rand()%30)==0) { int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); if (np>=0) diff --git a/src/elements/pcln.c b/src/elements/pcln.c index 1ffcbb4..74412e0 100644 --- a/src/elements/pcln.c +++ b/src/elements/pcln.c @@ -91,7 +91,7 @@ int update_PCLN(UPDATE_FUNC_ARGS) { } } } - else + else if (parts[i].ctype!=PT_LIGH || (rand()%30)==0) { int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); if (np>=0) |
