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