diff options
| author | jacob1 <jfu614@gmail.com> | 2012-10-12 19:17:22 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-10-26 14:12:21 (GMT) |
| commit | 4d207b1146c4633349430da086697cceabdef892 (patch) | |
| tree | c46f560b63be63261282a00febe12047213f8d20 /src/simulation/elements/INVIS.cpp | |
| parent | 947660fcd445be2e09fe52da912547a69c685ba7 (diff) | |
| download | powder-4d207b1146c4633349430da086697cceabdef892.zip powder-4d207b1146c4633349430da086697cceabdef892.tar.gz | |
fix INVS graphics
Diffstat (limited to 'src/simulation/elements/INVIS.cpp')
| -rw-r--r-- | src/simulation/elements/INVIS.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/simulation/elements/INVIS.cpp b/src/simulation/elements/INVIS.cpp index 6010967..03f2d69 100644 --- a/src/simulation/elements/INVIS.cpp +++ b/src/simulation/elements/INVIS.cpp @@ -42,13 +42,20 @@ Element_INVIS::Element_INVIS() HighTemperature = ITH; HighTemperatureTransition = NT; - Update = NULL; + Update = &Element_INVIS::update; Graphics = &Element_INVIS::graphics; } +//#TPT-Directive ElementHeader Element_INVIS static int update(UPDATE_FUNC_ARGS) +int Element_INVIS::update(UPDATE_FUNC_ARGS) +{ + if (sim->pv[y/CELL][x/CELL]>4.0f || sim->pv[y/CELL][x/CELL]<-4.0f) + parts[i].tmp = 1; + return 0; +} + //#TPT-Directive ElementHeader Element_INVIS static int graphics(GRAPHICS_FUNC_ARGS) int Element_INVIS::graphics(GRAPHICS_FUNC_ARGS) - { //pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f if(cpart->tmp) |
