diff options
Diffstat (limited to 'src/simulation/elements/CLNE.cpp')
| -rw-r--r-- | src/simulation/elements/CLNE.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/src/simulation/elements/CLNE.cpp b/src/simulation/elements/CLNE.cpp index 482d2c9..f0dffc2 100644 --- a/src/simulation/elements/CLNE.cpp +++ b/src/simulation/elements/CLNE.cpp @@ -2,48 +2,48 @@ //#TPT-Directive ElementClass Element_CLNE PT_CLNE 9 Element_CLNE::Element_CLNE() { - Identifier = "DEFAULT_PT_CLNE"; - Name = "CLNE"; - Colour = PIXPACK(0xFFD010); - MenuVisible = 1; - MenuSection = SC_SPECIAL; - 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 = 1; - - Weight = 100; - - Temperature = R_TEMP+0.0f +273.15f; - HeatConduct = 251; - Description = "Solid. Duplicates any particles it touches."; - - State = ST_SOLID; - Properties = TYPE_SOLID; - - LowPressure = IPL; - LowPressureTransition = NT; - HighPressure = IPH; - HighPressureTransition = NT; - LowTemperature = ITL; - LowTemperatureTransition = NT; - HighTemperature = ITH; - HighTemperatureTransition = NT; - - Update = &Element_CLNE::update; - + Identifier = "DEFAULT_PT_CLNE"; + Name = "CLNE"; + Colour = PIXPACK(0xFFD010); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + 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 = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Solid. Duplicates any particles it touches."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_CLNE::update; + } //#TPT-Directive ElementHeader Element_CLNE static int update(UPDATE_FUNC_ARGS) @@ -54,7 +54,7 @@ int Element_CLNE::update(UPDATE_FUNC_ARGS) int r, rx, ry, rt; 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) + if (BOUNDS_CHECK) { r = sim->photons[y+ry][x+rx]; if (!r) @@ -63,9 +63,9 @@ int Element_CLNE::update(UPDATE_FUNC_ARGS) continue; rt = r&0xFF; if (rt!=PT_CLNE && rt!=PT_PCLN && - rt!=PT_BCLN && rt!=PT_STKM && - rt!=PT_PBCN && rt!=PT_STKM2 && - rt<PT_NUM) + rt!=PT_BCLN && rt!=PT_STKM && + rt!=PT_PBCN && rt!=PT_STKM2 && + rt<PT_NUM) { parts[i].ctype = rt; if (rt==PT_LIFE || rt==PT_LAVA) |
