diff options
Diffstat (limited to 'src/simulation/elements/LIFE.cpp')
| -rw-r--r-- | src/simulation/elements/LIFE.cpp | 9 |
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) |
