mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-02 14:37:32 +02:00
Reduce rate of lightning creation by clone
This commit is contained in:
@@ -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)
|
||||||
|
@@ -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)
|
||||||
|
@@ -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)
|
||||||
|
@@ -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)
|
||||||
|
Reference in New Issue
Block a user