summaryrefslogtreecommitdiff
path: root/src/simulation/elements/PRTI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/PRTI.cpp')
-rw-r--r--src/simulation/elements/PRTI.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/simulation/elements/PRTI.cpp b/src/simulation/elements/PRTI.cpp
index fc48325..4f5a0f5 100644
--- a/src/simulation/elements/PRTI.cpp
+++ b/src/simulation/elements/PRTI.cpp
@@ -2,48 +2,48 @@
//#TPT-Directive ElementClass Element_PRTI PT_PRTI 109
Element_PRTI::Element_PRTI()
{
- Identifier = "DEFAULT_PT_PRTI";
- Name = "PRTI";
- Colour = PIXPACK(0xEB5917);
- 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.005f * CFDS;
- Falldown = 0;
-
- Flammable = 0;
- Explosive = 0;
- Meltable = 0;
- Hardness = 0;
-
- Weight = 100;
-
- Temperature = R_TEMP+0.0f +273.15f;
- HeatConduct = 0;
- Description = "Portal IN. Things go in here, now with channels (same as WIFI)";
-
- State = ST_SOLID;
- Properties = TYPE_SOLID;
-
- LowPressure = IPL;
- LowPressureTransition = NT;
- HighPressure = IPH;
- HighPressureTransition = NT;
- LowTemperature = ITL;
- LowTemperatureTransition = NT;
- HighTemperature = ITH;
- HighTemperatureTransition = NT;
-
- Update = &Element_PRTI::update;
- Graphics = &Element_PRTI::graphics;
+ Identifier = "DEFAULT_PT_PRTI";
+ Name = "PRTI";
+ Colour = PIXPACK(0xEB5917);
+ 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.005f * CFDS;
+ Falldown = 0;
+
+ Flammable = 0;
+ Explosive = 0;
+ Meltable = 0;
+ Hardness = 0;
+
+ Weight = 100;
+
+ Temperature = R_TEMP+0.0f +273.15f;
+ HeatConduct = 0;
+ Description = "Portal IN. Things go in here, now with channels (same as WIFI)";
+
+ State = ST_SOLID;
+ Properties = TYPE_SOLID;
+
+ LowPressure = IPL;
+ LowPressureTransition = NT;
+ HighPressure = IPH;
+ HighPressureTransition = NT;
+ LowTemperature = ITL;
+ LowTemperatureTransition = NT;
+ HighTemperature = ITH;
+ HighTemperatureTransition = NT;
+
+ Update = &Element_PRTI::update;
+ Graphics = &Element_PRTI::graphics;
}
/*these are the count values of where the particle gets stored, depending on where it came from
@@ -66,7 +66,7 @@ int Element_PRTI::update(UPDATE_FUNC_ARGS)
{
rx = sim->portal_rx[count];
ry = sim->portal_ry[count];
- 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)