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:
Catelite 2012-06-13 13:14:44 -04:00 committed by Simon Robertshaw
parent 12cf2a3145
commit a83a995f23
2 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,7 @@ int update_PLNT(UPDATE_FUNC_ARGS) {
kill_part(r>>8);
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 nny = rand()%3 -1;

View File

@ -27,6 +27,7 @@ int update_VINE(UPDATE_FUNC_ARGS) {
np = create_part(-1,x+rx,y+ry,PT_VINE);
if (np<0) return 0;
parts[np].temp = parts[i].temp;
parts[i].tmp = 1;
part_change_type(i,x,y,PT_PLNT);
}
}