Reduce rate of lightning creation by clone
This commit is contained in:
parent
3a946efdfd
commit
167740e839
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user