Added a tmp=1 flag to PLNT so that VINE will actually function like intended when VINE_MODE is disabled. Plant touching wood is unaffected, but vine that touches wood will grow.
This commit is contained in:
parent
12cf2a3145
commit
a83a995f23
@ -40,7 +40,7 @@ int update_PLNT(UPDATE_FUNC_ARGS) {
|
|||||||
kill_part(r>>8);
|
kill_part(r>>8);
|
||||||
parts[i].life = rand()%60 + 60;
|
parts[i].life = rand()%60 + 60;
|
||||||
}
|
}
|
||||||
else if ((r&0xFF)==PT_WOOD && (1>rand()%20) && abs(rx+ry)<=2 && VINE_MODE)
|
else if ( ((r&0xFF)==PT_WOOD) && (1>rand()%20) && (abs(rx+ry)<=2) && (VINE_MODE || parts[i].tmp==1) )
|
||||||
{
|
{
|
||||||
int nnx = rand()%3 -1;
|
int nnx = rand()%3 -1;
|
||||||
int nny = rand()%3 -1;
|
int nny = rand()%3 -1;
|
||||||
|
@ -27,6 +27,7 @@ int update_VINE(UPDATE_FUNC_ARGS) {
|
|||||||
np = create_part(-1,x+rx,y+ry,PT_VINE);
|
np = create_part(-1,x+rx,y+ry,PT_VINE);
|
||||||
if (np<0) return 0;
|
if (np<0) return 0;
|
||||||
parts[np].temp = parts[i].temp;
|
parts[np].temp = parts[i].temp;
|
||||||
|
parts[i].tmp = 1;
|
||||||
part_change_type(i,x,y,PT_PLNT);
|
part_change_type(i,x,y,PT_PLNT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user