Reduce rate of lightning creation by clone

This commit is contained in:
jacksonmj 2012-06-27 00:59:07 +01:00
parent 3a946efdfd
commit 167740e839
4 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ int update_BCLN(UPDATE_FUNC_ARGS) {
} }
else { 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)); 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); int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype);
if (np>=0) if (np>=0)

View File

@ -41,7 +41,7 @@ int update_CLNE(UPDATE_FUNC_ARGS) {
} }
else { 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)); 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); int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype);
if (np>=0) if (np>=0)

View File

@ -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); int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype);
if (np>=0) if (np>=0)

View File

@ -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); int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype);
if (np>=0) if (np>=0)