summaryrefslogtreecommitdiff
path: root/src/simulation/elements/EXOT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/EXOT.cpp')
-rw-r--r--src/simulation/elements/EXOT.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/simulation/elements/EXOT.cpp b/src/simulation/elements/EXOT.cpp
index 1b763ca..52bf462 100644
--- a/src/simulation/elements/EXOT.cpp
+++ b/src/simulation/elements/EXOT.cpp
@@ -2,48 +2,48 @@
//#TPT-Directive ElementClass Element_EXOT PT_EXOT 145
Element_EXOT::Element_EXOT()
{
- Identifier = "DEFAULT_PT_EXOT";
- Name = "EXOT";
- Colour = PIXPACK(0x404040);
- MenuVisible = 1;
- MenuSection = SC_NUCLEAR;
- Enabled = 1;
-
- Advection = 0.3f;
- AirDrag = 0.02f * CFDS;
- AirLoss = 0.95f;
- Loss = 0.80f;
- Collision = 0.0f;
- Gravity = 0.15f;
- Diffusion = 0.00f;
- HotAir = 0.0003f * CFDS;
- Falldown = 2;
-
- Flammable = 0;
- Explosive = 0;
- Meltable = 0;
- Hardness = 2;
-
- Weight = 46;
-
- Temperature = R_TEMP-2.0f +273.15f;
- HeatConduct = 250;
- Description = "Exotic matter. Explodes with excess exposure to electrons.";
-
- State = ST_LIQUID;
- Properties = TYPE_LIQUID|PROP_NEUTPASS;
-
- LowPressure = IPL;
- LowPressureTransition = NT;
- HighPressure = IPH;
- HighPressureTransition = NT;
- LowTemperature = ITL;
- LowTemperatureTransition = NT;
- HighTemperature = ITH;
- HighTemperatureTransition = NT;
-
- Update = &Element_EXOT::update;
- Graphics = &Element_EXOT::graphics;
+ Identifier = "DEFAULT_PT_EXOT";
+ Name = "EXOT";
+ Colour = PIXPACK(0x404040);
+ MenuVisible = 1;
+ MenuSection = SC_NUCLEAR;
+ Enabled = 1;
+
+ Advection = 0.3f;
+ AirDrag = 0.02f * CFDS;
+ AirLoss = 0.95f;
+ Loss = 0.80f;
+ Collision = 0.0f;
+ Gravity = 0.15f;
+ Diffusion = 0.00f;
+ HotAir = 0.0003f * CFDS;
+ Falldown = 2;
+
+ Flammable = 0;
+ Explosive = 0;
+ Meltable = 0;
+ Hardness = 2;
+
+ Weight = 46;
+
+ Temperature = R_TEMP-2.0f +273.15f;
+ HeatConduct = 250;
+ Description = "Exotic matter. Explodes with excess exposure to electrons.";
+
+ State = ST_LIQUID;
+ Properties = TYPE_LIQUID|PROP_NEUTPASS;
+
+ LowPressure = IPL;
+ LowPressureTransition = NT;
+ HighPressure = IPH;
+ HighPressureTransition = NT;
+ LowTemperature = ITL;
+ LowTemperatureTransition = NT;
+ HighTemperature = ITH;
+ HighTemperatureTransition = NT;
+
+ Update = &Element_EXOT::update;
+ Graphics = &Element_EXOT::graphics;
}
//#TPT-Directive ElementHeader Element_EXOT static int update(UPDATE_FUNC_ARGS)
@@ -51,7 +51,7 @@ int Element_EXOT::update(UPDATE_FUNC_ARGS) {
int r, rt, rx, ry, nb, rrx, rry, trade, tym;
for (rx=-2; rx<=2; rx++)
for (ry=-2; ry<=2; ry++)
- if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES && (rx || ry)) {
+ if (BOUNDS_CHECK && (rx || ry)) {
r = pmap[y+ry][x+rx];
if (!r)
continue;