diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2013-03-14 11:30:35 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2013-03-14 11:30:35 (GMT) |
| commit | 9ab70756af4fb3f0f9c4e287f1b30e0897a19741 (patch) | |
| tree | bcdeaecbe71f0152e9a9c9b81ee65e4aa1f717ec /src/simulation/elements/EXOT.cpp | |
| parent | 9479b7f3300658156c467980c28d3436a728bc0c (diff) | |
| parent | 10e104f3f51ed7de80419e2eba0fbbad457aa528 (diff) | |
| download | powder-9ab70756af4fb3f0f9c4e287f1b30e0897a19741.zip powder-9ab70756af4fb3f0f9c4e287f1b30e0897a19741.tar.gz | |
Merge branch 'master' of github.com:FacialTurd/The-Powder-Toy
Diffstat (limited to 'src/simulation/elements/EXOT.cpp')
| -rw-r--r-- | src/simulation/elements/EXOT.cpp | 86 |
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; |
