summaryrefslogtreecommitdiff
path: root/src/simulation/elements/PRTI.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-12 16:31:32 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-12 16:31:32 (GMT)
commit6af88ee7daaa3bbfd11a468fff15847068220000 (patch)
treeeae0b04df2817a408759462bbce92712725460cd /src/simulation/elements/PRTI.cpp
parent20e85066dcf9769fabaf525ba0123fe0f1d1078c (diff)
downloadpowder-6af88ee7daaa3bbfd11a468fff15847068220000.zip
powder-6af88ee7daaa3bbfd11a468fff15847068220000.tar.gz
TPT: Change pipe and portal to check element type using properties instead of falldown and state 11bd67eb61
Diffstat (limited to 'src/simulation/elements/PRTI.cpp')
-rw-r--r--src/simulation/elements/PRTI.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/simulation/elements/PRTI.cpp b/src/simulation/elements/PRTI.cpp
index 4d13bd1..451c54b 100644
--- a/src/simulation/elements/PRTI.cpp
+++ b/src/simulation/elements/PRTI.cpp
@@ -63,10 +63,10 @@ int Element_PRTI::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx];
if (!r)
fe = 1;
- if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (sim->elements[r&0xFF].Falldown== 0 && sim->elements[r&0xFF].State != ST_GAS && (r&0xFF)!=PT_SPRK))
+ if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (!(sim->elements[r&0xFF].Properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) && (r&0xFF)!=PT_SPRK))
{
r = sim->photons[y+ry][x+rx];
- if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (sim->elements[r&0xFF].Falldown== 0 && sim->elements[r&0xFF].State != ST_GAS && (r&0xFF)!=PT_SPRK))
+ if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (!(sim->elements[r&0xFF].Properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) && (r&0xFF)!=PT_SPRK))
continue;
}
@@ -136,4 +136,4 @@ int Element_PRTI::graphics(GRAPHICS_FUNC_ARGS)
}
-Element_PRTI::~Element_PRTI() {} \ No newline at end of file
+Element_PRTI::~Element_PRTI() {}