summaryrefslogtreecommitdiff
path: root/src/simulation/elements/WIFI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/WIFI.cpp')
-rw-r--r--src/simulation/elements/WIFI.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/simulation/elements/WIFI.cpp b/src/simulation/elements/WIFI.cpp
index 4cbf0d5..6b04040 100644
--- a/src/simulation/elements/WIFI.cpp
+++ b/src/simulation/elements/WIFI.cpp
@@ -2,48 +2,48 @@
//#TPT-Directive ElementClass Element_WIFI PT_WIFI 124
Element_WIFI::Element_WIFI()
{
- Identifier = "DEFAULT_PT_WIFI";
- Name = "WIFI";
- Colour = PIXPACK(0x40A060);
- MenuVisible = 1;
- MenuSection = SC_ELEC;
- Enabled = 1;
-
- Advection = 0.0f;
- AirDrag = 0.00f * CFDS;
- AirLoss = 0.90f;
- Loss = 0.00f;
- Collision = 0.0f;
- Gravity = 0.0f;
- Diffusion = 0.00f;
- HotAir = 0.000f * CFDS;
- Falldown = 0;
-
- Flammable = 0;
- Explosive = 0;
- Meltable = 0;
- Hardness = 2;
-
- Weight = 100;
-
- Temperature = R_TEMP+0.0f +273.15f;
- HeatConduct = 0;
- Description = "Wireless transmitter, color coded.";
-
- State = ST_SOLID;
- Properties = TYPE_SOLID;
-
- LowPressure = IPL;
- LowPressureTransition = NT;
- HighPressure = 15.0f;
- HighPressureTransition = PT_BRMT;
- LowTemperature = ITL;
- LowTemperatureTransition = NT;
- HighTemperature = ITH;
- HighTemperatureTransition = NT;
-
- Update = &Element_WIFI::update;
- Graphics = &Element_WIFI::graphics;
+ Identifier = "DEFAULT_PT_WIFI";
+ Name = "WIFI";
+ Colour = PIXPACK(0x40A060);
+ MenuVisible = 1;
+ MenuSection = SC_ELEC;
+ Enabled = 1;
+
+ Advection = 0.0f;
+ AirDrag = 0.00f * CFDS;
+ AirLoss = 0.90f;
+ Loss = 0.00f;
+ Collision = 0.0f;
+ Gravity = 0.0f;
+ Diffusion = 0.00f;
+ HotAir = 0.000f * CFDS;
+ Falldown = 0;
+
+ Flammable = 0;
+ Explosive = 0;
+ Meltable = 0;
+ Hardness = 2;
+
+ Weight = 100;
+
+ Temperature = R_TEMP+0.0f +273.15f;
+ HeatConduct = 0;
+ Description = "Wireless transmitter, color coded.";
+
+ State = ST_SOLID;
+ Properties = TYPE_SOLID;
+
+ LowPressure = IPL;
+ LowPressureTransition = NT;
+ HighPressure = 15.0f;
+ HighPressureTransition = PT_BRMT;
+ LowTemperature = ITL;
+ LowTemperatureTransition = NT;
+ HighTemperature = ITH;
+ HighTemperatureTransition = NT;
+
+ Update = &Element_WIFI::update;
+ Graphics = &Element_WIFI::graphics;
}
//#TPT-Directive ElementHeader Element_WIFI static int update(UPDATE_FUNC_ARGS)
@@ -55,7 +55,7 @@ int Element_WIFI::update(UPDATE_FUNC_ARGS)
else if (parts[i].tmp<0) parts[i].tmp = 0;
for (rx=-1; rx<2; rx++)
for (ry=-1; 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)