summaryrefslogtreecommitdiff
path: root/src/simulation/elements/BREC.cpp
diff options
context:
space:
mode:
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() {}