diff options
| author | Simon 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) |
| commit | 6af88ee7daaa3bbfd11a468fff15847068220000 (patch) | |
| tree | eae0b04df2817a408759462bbce92712725460cd /src/simulation/elements/PIPE.cpp | |
| parent | 20e85066dcf9769fabaf525ba0123fe0f1d1078c (diff) | |
| download | powder-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/PIPE.cpp')
| -rw-r--r-- | src/simulation/elements/PIPE.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/simulation/elements/PIPE.cpp b/src/simulation/elements/PIPE.cpp index 216d3d7..2370b05 100644 --- a/src/simulation/elements/PIPE.cpp +++ b/src/simulation/elements/PIPE.cpp @@ -129,7 +129,7 @@ int Element_PIPE::update(UPDATE_FUNC_ARGS) } } //try eating particle at entrance - else if ((parts[i].tmp&0xFF) == 0 && (sim->elements[r&0xFF].Falldown!= 0 || sim->elements[r&0xFF].State == ST_GAS)) + else if ((parts[i].tmp&0xFF) == 0 && (sim->elements[r&0xFF].Properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY))) { if ((r&0xFF)==PT_SOAP) sim->detach(r>>8); @@ -140,7 +140,7 @@ int Element_PIPE::update(UPDATE_FUNC_ARGS) parts[i].pavg[1] = parts[r>>8].ctype; sim->kill_part(r>>8); } - else if ((parts[i].tmp&0xFF) == 0 && (r&0xFF)==PT_STOR && parts[r>>8].tmp && (sim->elements[parts[r>>8].tmp].Falldown!= 0 || sim->elements[parts[r>>8].tmp].State == ST_GAS)) + else if ((parts[i].tmp&0xFF) == 0 && (r&0xFF)==PT_STOR && parts[r>>8].tmp && (sim->elements[parts[r>>8].tmp].Properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY))) { parts[i].tmp = parts[r>>8].tmp; parts[i].temp = parts[r>>8].temp; @@ -387,4 +387,4 @@ void Element_PIPE::pushParticle(Simulation * sim, int i, int count, int original } -Element_PIPE::~Element_PIPE() {}
\ No newline at end of file +Element_PIPE::~Element_PIPE() {} |
