summaryrefslogtreecommitdiff
path: root/src/simulation/elements/BREC.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-12 23:57:02 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-12 23:57:02 (GMT)
commit427670682ffaadc81aa6a2363d5b6428d14e1ad7 (patch)
treed3621a1bc26c8e4e614c2805ddf3b598c24e1d7b /src/simulation/elements/BREC.cpp
parent19d071f10b477059680baa905878c77dd7f6b80a (diff)
downloadpowder-427670682ffaadc81aa6a2363d5b6428d14e1ad7.zip
powder-427670682ffaadc81aa6a2363d5b6428d14e1ad7.tar.gz
TPT: EXOT
Diffstat (limited to 'src/simulation/elements/BREC.cpp')
-rw-r--r--src/simulation/elements/BREC.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/simulation/elements/BREC.cpp b/src/simulation/elements/BREC.cpp
index 9668785..807d650 100644
--- a/src/simulation/elements/BREC.cpp
+++ b/src/simulation/elements/BREC.cpp
@@ -42,8 +42,23 @@ Element_BREC::Element_BREC()
HighTemperature = ITH;
HighTemperatureTransition = NT;
- Update = NULL;
+ Update = &Element_BREC::update;
Graphics = NULL;
}
-Element_BREC::~Element_BREC() {} \ No newline at end of file
+//#TPT-Directive ElementHeader Element_BREC static int update(UPDATE_FUNC_ARGS)
+int Element_BREC::update(UPDATE_FUNC_ARGS)
+{
+ int np;
+ if (1>rand()%200 && (sim->pv[y/CELL][x/CELL] > 30.0f) && parts[i].temp>9000 && parts[i].life>0)
+ {
+ sim->part_change_type(i, x ,y ,PT_EXOT);
+ parts[i].life = 1000;
+ }
+ if ((sim->pv[y/CELL][x/CELL] > 10.0f) && (parts[i].life>0)) {
+ parts[i].temp = parts[i].temp + (sim->pv[y/CELL][x/CELL])/8;
+ }
+ return 0;
+}
+
+Element_BREC::~Element_BREC() {}