diff options
| author | cracker64 <cracker642@gmail.com> | 2013-02-28 05:40:36 (GMT) |
|---|---|---|
| committer | cracker64 <cracker642@gmail.com> | 2013-02-28 05:40:36 (GMT) |
| commit | c65081d3ed44a97cea0f41a63e9ec07cf0feb5f2 (patch) | |
| tree | 90744a56bc618c12aab5ef617445b283ce2d6d57 /src/simulation/elements/VINE.cpp | |
| parent | 08d1a68ce091b6ba53788224fd1bda92c1895ca6 (diff) | |
| download | powder-c65081d3ed44a97cea0f41a63e9ec07cf0feb5f2.zip powder-c65081d3ed44a97cea0f41a63e9ec07cf0feb5f2.tar.gz | |
Finished first pass-through for all elements.
Will get a few more places later.
Diffstat (limited to 'src/simulation/elements/VINE.cpp')
| -rw-r--r-- | src/simulation/elements/VINE.cpp | 8 |
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() {} |
