summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-12 16:25:06 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-12 16:25:06 (GMT)
commit50a587813e534eefe3741a534e95696bf2855cb1 (patch)
tree4b6a0d5abd0db4898b52cc01219f5d5b435282e2 /src/simulation
parent318499350d80697be0563e2a43c2fc2df059c412 (diff)
downloadpowder-50a587813e534eefe3741a534e95696bf2855cb1.zip
powder-50a587813e534eefe3741a534e95696bf2855cb1.tar.gz
TPT: Add PROP_NOAMBHEAT to prevent certain elements from being heated by Ambient heat… 8397b6e51a
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/Elements.h1
-rw-r--r--src/simulation/Simulation.cpp2
-rw-r--r--src/simulation/elements/FILT.cpp4
3 files changed, 4 insertions, 3 deletions
diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h
index cfea1af..781a8f8 100644
--- a/src/simulation/Elements.h
+++ b/src/simulation/Elements.h
@@ -35,6 +35,7 @@
#define PROP_LIFE_KILL 0x08000 //2^15 Kill when life value is <= zero
#define PROP_LIFE_KILL_DEC 0x10000 //2^16 Kill when life value is decremented to <= zero
#define PROP_SPARKSETTLE 0x20000 //2^17 Allow Sparks/Embers to settle
+#define PROP_NOAMBHEAT 0x40000 //2^18 Don't transfer or receive heat from ambient heat.
#define FLAG_STAGNANT 1
#define FLAG_SKIPMOVE 0x2 // skip movement for one frame, only implemented for PHOT
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 8c78496..1cedb5c 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -3134,7 +3134,7 @@ void Simulation::update_particles_i(int start, int inc)
{
float c_Cm = 0.0f;
#endif
- if (aheat_enable)
+ if (aheat_enable && !(elements[t].Properties&PROP_NOAMBHEAT))
{
#ifdef REALISTIC
c_heat = parts[i].temp*96.645/elements[t].HeatConduct*gel_scale*fabs(elements[t].Weight) + hv[y/CELL][x/CELL]*100*(pv[y/CELL][x/CELL]+273.15f)/256;
diff --git a/src/simulation/elements/FILT.cpp b/src/simulation/elements/FILT.cpp
index c978690..fcfae40 100644
--- a/src/simulation/elements/FILT.cpp
+++ b/src/simulation/elements/FILT.cpp
@@ -31,7 +31,7 @@ Element_FILT::Element_FILT()
Description = "Filter for photons, changes the color.";
State = ST_SOLID;
- Properties = TYPE_SOLID;
+ Properties = TYPE_SOLID | PROP_NOAMBHEAT;
LowPressure = IPL;
LowPressureTransition = NT;
@@ -74,4 +74,4 @@ int Element_FILT::graphics(GRAPHICS_FUNC_ARGS)
}
-Element_FILT::~Element_FILT() {} \ No newline at end of file
+Element_FILT::~Element_FILT() {}