summaryrefslogtreecommitdiff
path: root/src/simulation/elements
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-12 19:17:22 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-26 14:12:21 (GMT)
commit4d207b1146c4633349430da086697cceabdef892 (patch)
treec46f560b63be63261282a00febe12047213f8d20 /src/simulation/elements
parent947660fcd445be2e09fe52da912547a69c685ba7 (diff)
downloadpowder-4d207b1146c4633349430da086697cceabdef892.zip
powder-4d207b1146c4633349430da086697cceabdef892.tar.gz
fix INVS graphics
Diffstat (limited to 'src/simulation/elements')
-rw-r--r--src/simulation/elements/FIRE.cpp1
-rw-r--r--src/simulation/elements/INVIS.cpp11
2 files changed, 9 insertions, 3 deletions
diff --git a/src/simulation/elements/FIRE.cpp b/src/simulation/elements/FIRE.cpp
index 5345070..f9313fa 100644
--- a/src/simulation/elements/FIRE.cpp
+++ b/src/simulation/elements/FIRE.cpp
@@ -94,7 +94,6 @@ int Element_FIRE::update(UPDATE_FUNC_ARGS)
(t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL)) &&
(t!=PT_PHOT || rt!=PT_INSL) &&
(rt!=PT_SPNG || parts[r>>8].life==0) &&
- (rt!=PT_H2 || (parts[r>>8].temp < 2273.15 && sim->pv[y/CELL][x/CELL] < 50.0f)) &&
sim->elements[rt].Flammable && (sim->elements[rt].Flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000))
{
sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE);
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)