Change pipe and portal to check element type using properties instead of falldown and state
This commit is contained in:
parent
f69920b96c
commit
11bd67eb61
@ -162,7 +162,7 @@ int update_PIPE(UPDATE_FUNC_ARGS) {
|
||||
}
|
||||
}
|
||||
//try eating particle at entrance
|
||||
else if ((parts[i].tmp&0xFF) == 0 && (ptypes[r&0xFF].falldown!= 0 || ptypes[r&0xFF].state == ST_GAS))
|
||||
else if ((parts[i].tmp&0xFF) == 0 && (ptypes[r&0xFF].properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)))
|
||||
{
|
||||
if ((r&0xFF)==PT_SOAP)
|
||||
detach(r>>8);
|
||||
@ -173,7 +173,7 @@ int update_PIPE(UPDATE_FUNC_ARGS) {
|
||||
parts[i].pavg[1] = parts[r>>8].ctype;
|
||||
kill_part(r>>8);
|
||||
}
|
||||
else if ((parts[i].tmp&0xFF) == 0 && (r&0xFF)==PT_STOR && parts[r>>8].tmp && (ptypes[parts[r>>8].tmp].falldown!= 0 || ptypes[parts[r>>8].tmp].state == ST_GAS))
|
||||
else if ((parts[i].tmp&0xFF) == 0 && (r&0xFF)==PT_STOR && parts[r>>8].tmp && (ptypes[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;
|
||||
|
@ -39,10 +39,10 @@ int update_PRTI(UPDATE_FUNC_ARGS) {
|
||||
r = pmap[y+ry][x+rx];
|
||||
if (!r)
|
||||
fe = 1;
|
||||
if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (ptypes[r&0xFF].falldown== 0 && ptypes[r&0xFF].state != ST_GAS && (r&0xFF)!=PT_SPRK))
|
||||
if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (!(ptypes[r&0xFF].properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) && (r&0xFF)!=PT_SPRK))
|
||||
{
|
||||
r = photons[y+ry][x+rx];
|
||||
if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (ptypes[r&0xFF].falldown== 0 && ptypes[r&0xFF].state != ST_GAS && (r&0xFF)!=PT_SPRK))
|
||||
if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (!(ptypes[r&0xFF].properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) && (r&0xFF)!=PT_SPRK))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user