summaryrefslogtreecommitdiff
path: root/src/simulation/elements/WOOD.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-03-03 00:07:00 (GMT)
committer jacob1 <jfu614@gmail.com>2013-03-03 00:07:00 (GMT)
commit846d7d8064cf84c6b4e55a8a0417e7e605e0d144 (patch)
treeff8006377ff9508734e34247347e6efe3c239ed1 /src/simulation/elements/WOOD.cpp
parent85cb4b37c93baa3e227fa6a93c8312b9ab0fb6c3 (diff)
downloadpowder-846d7d8064cf84c6b4e55a8a0417e7e605e0d144.zip
powder-846d7d8064cf84c6b4e55a8a0417e7e605e0d144.tar.gz
allow NEUT to travel through ICE and SNOW, and for it to turn OIL to GAS (both like inextremely old versions)
Diffstat (limited to 'src/simulation/elements/WOOD.cpp')
-rw-r--r--src/simulation/elements/WOOD.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/simulation/elements/WOOD.cpp b/src/simulation/elements/WOOD.cpp
index 54e2e50..d15849e 100644
--- a/src/simulation/elements/WOOD.cpp
+++ b/src/simulation/elements/WOOD.cpp
@@ -42,10 +42,17 @@ Element_WOOD::Element_WOOD()
HighTemperature = 873.0f;
HighTemperatureTransition = PT_FIRE;
- Update = NULL;
+ Update = &Element_WOOD::update;
Graphics = &Element_WOOD::graphics;
}
+//#TPT-Directive ElementHeader Element_WOOD static int update(UPDATE_FUNC_ARGS)
+int Element_WOOD::update(UPDATE_FUNC_ARGS)
+{
+ if (parts[i].temp > 450 && parts[i].temp > parts[i].tmp)
+ parts[i].tmp = (int)parts[i].temp;
+ return 0;
+}
//#TPT-Directive ElementHeader Element_WOOD static int graphics(GRAPHICS_FUNC_ARGS)
int Element_WOOD::graphics(GRAPHICS_FUNC_ARGS)
{
@@ -55,8 +62,6 @@ int Element_WOOD::graphics(GRAPHICS_FUNC_ARGS)
*colr -= (int)restrict_flt((maxtemp-400)/3,0,172);
*colg -= (int)restrict_flt((maxtemp-400)/4,0,140);
*colb -= (int)restrict_flt((maxtemp-400)/20,0,44);
- if (maxtemp > 450)
- cpart->tmp = (int)maxtemp;
}
if (maxtemp < 273)
{