summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorCatelite <liclockwork@yahoo.com>2012-06-13 17:14:44 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-13 17:28:27 (GMT)
commita83a995f23c7b7b511b05f312f1e686acac74183 (patch)
tree3c51ad0f073ca6dac399bf00d43daa77a743aa58 /src/elements
parent12cf2a31455331d6f0b07f2e029a73eab2ac4cbf (diff)
downloadpowder-a83a995f23c7b7b511b05f312f1e686acac74183.zip
powder-a83a995f23c7b7b511b05f312f1e686acac74183.tar.gz
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.
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/plnt.c2
-rw-r--r--src/elements/vine.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/elements/plnt.c b/src/elements/plnt.c
index 6a2adc3..0df69b5 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 03de6f1..5af5d48 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);
}
}