summaryrefslogtreecommitdiff
path: root/src/simulation/elements/VINE.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/VINE.cpp')
-rw-r--r--src/simulation/elements/VINE.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/simulation/elements/VINE.cpp b/src/simulation/elements/VINE.cpp
index e31c8cd..973aad6 100644
--- a/src/simulation/elements/VINE.cpp
+++ b/src/simulation/elements/VINE.cpp
@@ -48,19 +48,19 @@ Element_VINE::Element_VINE()
//#TPT-Directive ElementHeader Element_VINE static int update(UPDATE_FUNC_ARGS)
int Element_VINE::update(UPDATE_FUNC_ARGS)
- {
+{
int r, np, rx =(rand()%3)-1, ry=(rand()%3)-1;
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
{
r = pmap[y+ry][x+rx];
- if (1>rand()%15)
+ if (!(rand()%15))
sim->part_change_type(i,x,y,PT_PLNT);
else if (!r)
{
np = sim->create_part(-1,x+rx,y+ry,PT_VINE);
if (np<0) return 0;
parts[np].temp = parts[i].temp;
- parts[i].tmp = 1;
+ parts[i].tmp = 1;
sim->part_change_type(i,x,y,PT_PLNT);
}
}
@@ -88,4 +88,4 @@ int Element_VINE::graphics(GRAPHICS_FUNC_ARGS)
}
-Element_VINE::~Element_VINE() {} \ No newline at end of file
+Element_VINE::~Element_VINE() {}