summaryrefslogtreecommitdiff
path: root/src/simulation/elements/LIFE.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-03-04 00:07:15 (GMT)
committer jacob1 <jfu614@gmail.com>2013-03-04 00:07:15 (GMT)
commitf951e5cda9ad51b590767790519091af8d4a6ee1 (patch)
tree6e99485f653a0bbb87c081aae9467eff3a7d7f28 /src/simulation/elements/LIFE.cpp
parent8b83ae9f95210ab3d540c985f82bc344786c3b85 (diff)
downloadpowder-f951e5cda9ad51b590767790519091af8d4a6ee1.zip
powder-f951e5cda9ad51b590767790519091af8d4a6ee1.tar.gz
fix LIFE
Diffstat (limited to 'src/simulation/elements/LIFE.cpp')
-rw-r--r--src/simulation/elements/LIFE.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/simulation/elements/LIFE.cpp b/src/simulation/elements/LIFE.cpp
index 4207931..a664d2f 100644
--- a/src/simulation/elements/LIFE.cpp
+++ b/src/simulation/elements/LIFE.cpp
@@ -46,7 +46,7 @@ Element_LIFE::Element_LIFE()
HighTemperature = ITH;
HighTemperatureTransition = NT;
- Update = NULL;
+ Update = &Element_LIFE::update;
Graphics = &Element_LIFE::graphics;
if(!Element_GOL_colourInit)
@@ -64,6 +64,13 @@ Element_LIFE::Element_LIFE()
}
}
+//#TPT-Directive ElementHeader Element_LIFE static int update(UPDATE_FUNC_ARGS)
+int Element_LIFE::update(UPDATE_FUNC_ARGS)
+{
+ if (parts[i].tmp <= 0)
+ sim->kill_part(i);
+ return 0;
+}
//#TPT-Directive ElementHeader Element_LIFE static int graphics(GRAPHICS_FUNC_ARGS)
int Element_LIFE::graphics(GRAPHICS_FUNC_ARGS)