From 50a587813e534eefe3741a534e95696bf2855cb1 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 12 Jun 2012 17:25:06 +0100 Subject: [PATCH] =?UTF-8?q?TPT:=20Add=20PROP=5FNOAMBHEAT=20to=20prevent=20?= =?UTF-8?q?certain=20elements=20from=20being=20heated=20by=20Ambient=20hea?= =?UTF-8?q?t=85=208397b6e51a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/simulation/Elements.h | 1 + src/simulation/Simulation.cpp | 2 +- src/simulation/elements/FILT.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h index cfea1afc7..781a8f8ae 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 8c7849649..1cedb5c88 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 c9786904e..fcfae4024 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() {}