diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 17:23:07 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 17:23:07 (GMT) |
| commit | de4fe1a38ec1114c384ddbb5ab68c7aa22541eed (patch) | |
| tree | c6ff99bc088e7b28148665615d3a4f706b3be3e8 /src/simulation | |
| parent | 5337f917368985b1163dfe7369d7aa7d507d1ead (diff) | |
| download | powder-de4fe1a38ec1114c384ddbb5ab68c7aa22541eed.zip powder-de4fe1a38ec1114c384ddbb5ab68c7aa22541eed.tar.gz | |
TPT: Reduce rate of lightning creation by clone 167740e839
Diffstat (limited to 'src/simulation')
| -rw-r--r-- | src/simulation/elements/BCLN.cpp | 2 | ||||
| -rw-r--r-- | src/simulation/elements/CLNE.cpp | 2 | ||||
| -rw-r--r-- | src/simulation/elements/PBCN.cpp | 2 | ||||
| -rw-r--r-- | src/simulation/elements/PCLN.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/simulation/elements/BCLN.cpp b/src/simulation/elements/BCLN.cpp index 0e93011..457a9aa 100644 --- a/src/simulation/elements/BCLN.cpp +++ b/src/simulation/elements/BCLN.cpp @@ -82,7 +82,7 @@ int Element_BCLN::update(UPDATE_FUNC_ARGS) } else { if (parts[i].ctype==PT_LIFE) sim->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 = sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); if (np>=0) diff --git a/src/simulation/elements/CLNE.cpp b/src/simulation/elements/CLNE.cpp index f76ed75..62c67c0 100644 --- a/src/simulation/elements/CLNE.cpp +++ b/src/simulation/elements/CLNE.cpp @@ -74,7 +74,7 @@ int Element_CLNE::update(UPDATE_FUNC_ARGS) } else { if (parts[i].ctype==PT_LIFE) sim->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 = sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); if (np>=0) diff --git a/src/simulation/elements/PBCN.cpp b/src/simulation/elements/PBCN.cpp index af37a59..088f807 100644 --- a/src/simulation/elements/PBCN.cpp +++ b/src/simulation/elements/PBCN.cpp @@ -136,7 +136,7 @@ int Element_PBCN::update(UPDATE_FUNC_ARGS) } } } - else + else if (parts[i].ctype!=PT_LIGH || (rand()%30)==0) { int np = sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); if (np>=0) diff --git a/src/simulation/elements/PCLN.cpp b/src/simulation/elements/PCLN.cpp index 41701bc..1b814b0 100644 --- a/src/simulation/elements/PCLN.cpp +++ b/src/simulation/elements/PCLN.cpp @@ -126,7 +126,7 @@ int Element_PCLN::update(UPDATE_FUNC_ARGS) } } } - else + else if (parts[i].ctype!=PT_LIGH || (rand()%30)==0) { int np = sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); if (np>=0) |
