Photons and neutrons through portal

This commit is contained in:
jacksonmj 2011-04-14 20:01:21 +01:00 committed by Simon
parent 466a6b2ccb
commit 1c771d1ea4

View File

@ -23,22 +23,29 @@ int update_PRTI(UPDATE_FUNC_ARGS) {
count ++; count ++;
if (!r) if (!r)
fe = 1; fe = 1;
if ((r>>8)>=NPART || !r) if ((r>>8)>=NPART)
continue; continue;
if ((r&0xFF)==PT_SPRK || ((r&0xFF)!=PT_PRTI && (r&0xFF)!=PT_PRTO && (ptypes[r&0xFF].falldown!= 0 || ptypes[r&0xFF].state == ST_GAS))) 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))
for ( nnx=0; nnx<80; nnx++) {
if (!portal[parts[i].tmp][count-1][nnx]) r = photons[y+ry][x+rx];
{ if ((r>>8)>=NPART)
portal[parts[i].tmp][count-1][nnx] = parts[r>>8].type; continue;
portaltemp[parts[i].tmp][count-1][nnx] = parts[r>>8].temp; 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))
portalctype[parts[i].tmp][count-1][nnx] = parts[r>>8].ctype; continue;
if ((r&0xFF)==PT_SPRK) }
part_change_type(r>>8,x+rx,y+ry,parts[r>>8].ctype); for ( nnx=0; nnx<80; nnx++)
else if (!portal[parts[i].tmp][count-1][nnx])
kill_part(r>>8); {
fe = 1; portal[parts[i].tmp][count-1][nnx] = parts[r>>8].type;
break; portaltemp[parts[i].tmp][count-1][nnx] = parts[r>>8].temp;
} portalctype[parts[i].tmp][count-1][nnx] = parts[r>>8].ctype;
if ((r&0xFF)==PT_SPRK)
part_change_type(r>>8,x+rx,y+ry,parts[r>>8].ctype);
else
kill_part(r>>8);
fe = 1;
break;
}
} }