From a83a995f23c7b7b511b05f312f1e686acac74183 Mon Sep 17 00:00:00 2001 From: Catelite Date: Wed, 13 Jun 2012 13:14:44 -0400 Subject: [PATCH] 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. --- src/elements/plnt.c | 2 +- src/elements/vine.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/elements/plnt.c b/src/elements/plnt.c index 6a2adc331..0df69b54a 100644 --- a/src/elements/plnt.c +++ b/src/elements/plnt.c @@ -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; diff --git a/src/elements/vine.c b/src/elements/vine.c index 03de6f102..5af5d480d 100644 --- a/src/elements/vine.c +++ b/src/elements/vine.c @@ -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); } }