diff options
Diffstat (limited to 'src/simulation/elements/SHLD3.cpp')
| -rw-r--r-- | src/simulation/elements/SHLD3.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/src/simulation/elements/SHLD3.cpp b/src/simulation/elements/SHLD3.cpp index 64a9c1f..6eaae1c 100644 --- a/src/simulation/elements/SHLD3.cpp +++ b/src/simulation/elements/SHLD3.cpp @@ -2,48 +2,48 @@ //#TPT-Directive ElementClass Element_SHLD3 PT_SHLD3 121 Element_SHLD3::Element_SHLD3() { - Identifier = "DEFAULT_PT_SHLD3"; - Name = "SHD3"; - Colour = PIXPACK(0x444444); - MenuVisible = 0; - MenuSection = SC_CRACKER2; - Enabled = 1; - - Advection = 0.0f; - AirDrag = 0.00f * CFDS; - AirLoss = 1.00f; - 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 = 1; - - Weight = 100; - - Temperature = R_TEMP+0.0f +273.15f; - HeatConduct = 0; - Description = "Shield lvl 3"; - - State = ST_SOLID; - Properties = TYPE_SOLID|PROP_LIFE_DEC; - - LowPressure = IPL; - LowPressureTransition = NT; - HighPressure = 25.0f; - HighPressureTransition = PT_NONE; - LowTemperature = ITL; - LowTemperatureTransition = NT; - HighTemperature = ITH; - HighTemperatureTransition = NT; - - Update = &Element_SHLD3::update; - + Identifier = "DEFAULT_PT_SHLD3"; + Name = "SHD3"; + Colour = PIXPACK(0x444444); + MenuVisible = 0; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + 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 = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "Shield lvl 3"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 25.0f; + HighPressureTransition = PT_NONE; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_SHLD3::update; + } //#TPT-Directive ElementHeader Element_SHLD3 static int update(UPDATE_FUNC_ARGS) @@ -52,7 +52,7 @@ int Element_SHLD3::update(UPDATE_FUNC_ARGS) int r, nnx, nny, rx, ry, np; 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) |
