mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-01 06:00:15 +02:00
TPT: Reduce rate of lightning creation by clone 167740e839
This commit is contained in:
@@ -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